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

Re: Choosing which device gets mounted as root



On Thu, Aug 08, 2002 at 03:05:08PM -0700, nate wrote:
> 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

Right. I believe that it causes problems, so I'd like to avoid it.
As you said -- I want to keep the bootloader's configuration and
fstab the same. But I want to be able to do it dynamically: have two
different entries for booting (I use GRUB) and two different fstab 
files as well. Maybe I wasn't clear enough -- if I boot kernel a,
then, as you said, the read-only filesystem gets remounted according
to the first variant of the fstab file, which must correspond to the
boot options. If, however, the kernel b get loaded, it always means
that the second version of fstab must be used instead. And never
vice versa.

Here's the point: can I include an init script that would simply
switch between those two files *before* the remounting takes place?
Or, if you like, does that remount happen before init even gets to
do its work? In that case, I'm clueless ...

NB: That is only one and the very same disk put into different
places.

andrej

-- 
echo ${girl_name} > /etc/dumpdates



Reply to: