Gentoo Archives: gentoo-user

From: Francisco Ares <frares@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Portable Gentoo (Pen Drive Linux)
Date: Fri, 28 Mar 2014 15:24:50
Message-Id: CAHH9eM6aZKOaqYjR5553VLZfmgY1C0Ei+0_xeQd7i5QuKKdYpw@mail.gmail.com
In Reply to: Re: [gentoo-user] Portable Gentoo (Pen Drive Linux) by Francisco Ares
1 Also, as for a bootable flash drive, if you use logical volumes for mount
2 partitions, it works like a charm. If not, depending on the other physical
3 drives, during boot, drive letters may change (I believe during the
4 initramfs part of the boot).
5
6 It was basically like this:
7
8 - install a bare bones Gentoo system on a hard drive in the usual way, and
9 make it do whatever you'll want when it goes to the pen drive.
10 - build the kernel with several modules built in, in special usb storage
11 (of course) and all related to LVM (Gentoo Wiki is great!), and also, as I
12 use "genkernel", there is a command line argument "--lvm"
13 - create a few partitions on the pen drive (on mine there are two, but one
14 is enough), create logical volumes for /boot and / - or /root - at least)
15 - using grub2, in the file /etc/default/grub, the kernel command line
16 should include "dolvm scandelay=10 rootdelay=10" (the numerical values are
17 far from optimized).
18 - mount the root partition in another directory (so that other mounts would
19 not appear), copy it to yet another directory, strip it down (since I use
20 squashfs and it is read-only, there is no reason to have /usr/src ,
21 /usr/include , /usr/portage and many others), then copy to the pen drive
22 root partition; special care should be taken with /etc/fstab .
23 - umount your current /boot partition, mount the pen drive boot partition
24 in /boot (just to make things look familiar), mount the hard drive boot
25 partition elsewhere, copy its contents to the pen drive boot partition, and
26 issue a grub-install to the pen drive disk (/dev/sdb, for instance) and
27 grub-mkconfig -o /boot/grub/grub.cfg
28
29 That's very incomplete, since, for instance and as already mentioned, I use
30 a squashfs root partition, so I had to figure out some ways, using unionfs,
31 to have a writable partition mounted on top of the read only one for /var
32 and for /etc (at least).
33
34
35 2014-03-28 12:00 GMT-03:00 Francisco Ares <frares@×××××.com>:
36
37 > To auto log-in, I use a feature of "agetty":
38 >
39 > On /etc/inittab:
40 >
41 > # TERMINALS
42 > # c1:12345:respawn:/usr/bin/fbi -a -noverbose --nocomments
43 > /etc/splash/natural_altec/images/silent-1024x768.jpg
44 > c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux
45 > c2:2345:respawn:/sbin/agetty 38400 tty2 linux
46 > c3:2345:respawn:/sbin/agetty 38400 tty3 linux
47 > c4:2345:respawn:/sbin/agetty 38400 tty4 linux
48 > c5:2345:respawn:/sbin/agetty 38400 tty5 linux
49 > c6:2345:respawn:/sbin/agetty -a AutoLogInUserName 38400 tty6 linux
50 >
51 > And for auto run, after auto log-in accomplished, I use ".bash_profile" on
52 > the auto logged-in user's home directory.
53 >
54 > Hope this helps
55 > Francisco
56 >
57 >
58 > 2014-03-28 11:15 GMT-03:00 Peter Humphrey <peter@××××××××××××.uk>:
59 >
60 > On Saturday 22 Mar 2014 19:37:35 Neil Bothwick wrote:
61 >> > On Sat, 22 Mar 2014 13:57:22 +0000, Peter Humphrey wrote:
62 >> > > I've installed that old favourite SysRescCD on a pen drive, following
63 >> a
64 >> > > method I found on the Web to include a persistent file-system with all
65 >> > > the extras I wanted in, e.g., /usr/local/bin.
66 >> > >
67 >> > > It works well, except that I haven't found yet where to put all my
68 >> > > aliases to have them sourced at (auto) log-in.
69 >> >
70 >> > There is a file that is executed by default at login, I think it
71 >> > is .autorun. I remember having to add an option to ignore it on the
72 >> > LXFDVDs because we use .autorun on those to launch a browser.
73 >>
74 >> I had a poke around and didn't get anywhere with .autorun, but eventually
75 >> I
76 >> found that SysRescCD uses zsh, not bash. It hadn't occurred to me until
77 >> then
78 >> to consider the shell. So that's why the auto-login function wasn't
79 >> behaving
80 >> the way I expected.
81 >>
82 >> Thanks again Neil.
83 >>
84 >> --
85 >> Regards
86 >> Peter
87 >>
88 >>
89 >>
90 >

Replies

Subject Author
Re: [gentoo-user] Portable Gentoo (Pen Drive Linux) Nilesh Govindrajan <me@××××××××.com>