On 28-Mar-2014 8:55 pm, "Francisco Ares" <[email protected]> wrote: > > Also, as for a bootable flash drive, if you use logical volumes for mount partitions, it works like a charm. If not, depending on the other physical drives, during boot, drive letters may change (I believe during the initramfs part of the boot). > > It was basically like this: > > - install a bare bones Gentoo system on a hard drive in the usual way, and make it do whatever you'll want when it goes to the pen drive. > - build the kernel with several modules built in, in special usb storage (of course) and all related to LVM (Gentoo Wiki is great!), and also, as I use "genkernel", there is a command line argument "--lvm" > - create a few partitions on the pen drive (on mine there are two, but one is enough), create logical volumes for /boot and / - or /root - at least) > - using grub2, in the file /etc/default/grub, the kernel command line should include "dolvm scandelay=10 rootdelay=10" (the numerical values are far from optimized). > - mount the root partition in another directory (so that other mounts would not appear), copy it to yet another directory, strip it down (since I use squashfs and it is read-only, there is no reason to have /usr/src , /usr/include , /usr/portage and many others), then copy to the pen drive root partition; special care should be taken with /etc/fstab . > - umount your current /boot partition, mount the pen drive boot partition in /boot (just to make things look familiar), mount the hard drive boot partition elsewhere, copy its contents to the pen drive boot partition, and issue a grub-install to the pen drive disk (/dev/sdb, for instance) and grub-mkconfig -o /boot/grub/grub.cfg > > That's very incomplete, since, for instance and as already mentioned, I use a squashfs root partition, so I had to figure out some ways, using unionfs, to have a writable partition mounted on top of the read only one for /var and for /etc (at least). > > > 2014-03-28 12:00 GMT-03:00 Francisco Ares <[email protected]>: > >> To auto log-in, I use a feature of "agetty": >> >> On /etc/inittab: >> >> # TERMINALS >> # c1:12345:respawn:/usr/bin/fbi -a -noverbose --nocomments /etc/splash/natural_altec/images/silent-1024x768.jpg >> c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux >> c2:2345:respawn:/sbin/agetty 38400 tty2 linux >> c3:2345:respawn:/sbin/agetty 38400 tty3 linux >> c4:2345:respawn:/sbin/agetty 38400 tty4 linux >> c5:2345:respawn:/sbin/agetty 38400 tty5 linux >> c6:2345:respawn:/sbin/agetty -a AutoLogInUserName 38400 tty6 linux >> >> And for auto run, after auto log-in accomplished, I use ".bash_profile" on the auto logged-in user's home directory. >> >> Hope this helps >> Francisco >> >> >> 2014-03-28 11:15 GMT-03:00 Peter Humphrey <[email protected]>: >> >>> On Saturday 22 Mar 2014 19:37:35 Neil Bothwick wrote: >>> > On Sat, 22 Mar 2014 13:57:22 +0000, Peter Humphrey wrote: >>> > > I've installed that old favourite SysRescCD on a pen drive, following a >>> > > method I found on the Web to include a persistent file-system with all >>> > > the extras I wanted in, e.g., /usr/local/bin. >>> > > >>> > > It works well, except that I haven't found yet where to put all my >>> > > aliases to have them sourced at (auto) log-in. >>> > >>> > There is a file that is executed by default at login, I think it >>> > is .autorun. I remember having to add an option to ignore it on the >>> > LXFDVDs because we use .autorun on those to launch a browser. >>> >>> I had a poke around and didn't get anywhere with .autorun, but eventually I >>> found that SysRescCD uses zsh, not bash. It hadn't occurred to me until then >>> to consider the shell. So that's why the auto-login function wasn't behaving >>> the way I expected. >>> >>> Thanks again Neil. >>> >>> -- >>> Regards >>> Peter >>> >>> >> >
You don't really need to use LVM, you just assign filesystem labels and use root=LABEL=... Or use UUID

