[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Choosing which device gets mounted as root



<quote who="andrej hocevar">
> Hello. I have a script that's called from /etc/rc2.d and changes
> some files according to the kernel that's loaded, i.e. when I'm at my
> brother's (with my disk in his computer), the script does commonplace
> tricks like "cp /etc/X11/XF86Config-4.mybrother
> /etc/X11/XF86Config-4".
> Lately he's changed the order of his disks so mine gets represented by
> another name. Now when exactly does the root partition get
> mounted? Is it possible to simply add another line to that file like "cp
> /etc/fstab.mybro /etc/fstab" and correct /dev/hdx to /dev/hdy?


my understanding of it is that the bootloader mounts the root filesystem
read only, then it reads fstab and remounts the filesystem according
to the optons there. i have had instances where the 2 were not
the same and it caused some weird things to happen, so it's best
to keep them in sync which means updaing both the boot loader(usually
lilo - /etc/lilo.conf) and fstab.

it is probably possible but I wouldn't reccomend doing what your
doing. if you already have a script on the other disk i would
just have it mount the disk and execute your other scripts. or
copy your scripts to the other disk so they run on either one

nate





Reply to: