edbarx wrote:phenest wrote:Why would you do this instead of a permanent Grub entry?
Sometimes it is for the lolz, other times it is for the geeky feeling, but very often, it is out of sheer necessity. GRUB* sometimes, has the habit of playing roughly.
I for one appreciated your post. Thanks edbarx.
I have grub4dos installed to my MBR (and on a USB also) ... one of the entries looks like this
Code: Select all
# menu.lst
color white/blue black/cyan white/black cyan/black
timeout 5
default 1
title Debian
find --set-root /jessieamd64lxde
configfile /boot/grub/menu.lst
commandline
i.e. chains to the Debian grub menu.lst (the find command is just a empty file (jessieamd64lxde) located on the partition purely for grub to find).
Primarily because I run Debian frugally i.e. just a /live/filesystem.squashfs copy of the main installed version
Code: Select all
title Debian Jessie LIVE
find --set-root /jessieamd64lxde
kernel /boot/vmlinuz-3.16.0-4-amd64 boot=live showmounts
initrd /boot/initrd.img-3.16.0-4-amd64
as that way I boot the exact same system each and every time (and it runs quicker because its all overlaid in memory), but I fall back to booting full (read/write as per the previous case) to apply updates/make changes before recreating a new filesystem.squashfs again
cd /live
mksquashfs /mnt/sda1 filesystem.squashfs -e live
Very much like having a updateable liveCD Debian Jessie.
Whilst running from a squashfs has decompression overheads, generally the system decompresses quicker than IO so a half sized (compressed) system + decompression time is quicker than reading the full uncompressed into memory. Also all writes are written to memory rather than disk, so a lot quicker on that front. But all changes are of course lost at shutdown/reboot ... unless you make it a persistent session (set the partition label to 'persistence' or create a persistence filesystem file ... along with the required / union in persistence.conf file in the root folder of that persistence space).
I also use that grub4dos menu.lst to boot other frugals (such as Puppy Linux or similar) ... which can be handy as 'admin' type function. DebianDog is one of my first preferences for that
Code: Select all
title DebianDog only saves if run save2flash
find --set-root /MAIN/DD/live/jessie-i486.sgn
kernel /MAIN/DD/live/vmlinuz1 init=/bin/systemd from=/MAIN/DD noauto changes=EXIT:/MAIN/DD/live
initrd /MAIN/DD/live/initrd1.xz
I also have a debian jessie inside a filesystem file that's on a NTFS partition and with a
relatively minor change to initrd.img that can be booted read/write so all changes persist. Along with a relatively small grub4dos USB (mine's a 64MB allocated size) and the single main filesystem file stored in the cloud, you can download that single file to a Windows PC's NTFS filesystem and boot it using the USB.
Code: Select all
title READ/WRITE
find --set-root /ntfsusb
kernel /vmlinuz-3.16.0-4-amd64 boot=live config nofastboot persistence persistence-storage=file persistence-label=ntfsper quickreboot noprompt showmounts live-media-path=/live/ config rw
initrd /initrd.img-amended-xz0-compressed
I run firefox and skype in a restricted shell that's mostly cut-off by file/folder permissions around that. Having the main filesystem in a (read only) squashfs is yet another layer of protection. I did try virtualisation (virtualbox) for running the browser ...etc, but found that to be slow.