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