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