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

Re: Choosing which device gets mounted as root



On Fri, 2002-08-09 at 10:18, andrej hocevar wrote:
> 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.

Ok, let me see if I am understanding what you are doing.  You are using
grub on a floppy to boot a computer?  Wouldn't fstab be on the
respective file systems.  And even if they aren't doesn't grub have some
copying facilities to do this?  Or are you simply switching out a single
drive and taking from computer to computer.  Also cant you specify which
file is used as fstab?  I remember reading something to that effect in
the man pages of mount. In any case, maybe you could change it around
every time you knew you were changing computers.  

-- 
-Peace kid
  Scott Henson	shenson2@wvu.edu

"God's the ultimate playa, so naturally He's going to have some haters,"
rapper Ice Cube said. "But these haters need to realize that  if you
mess with the man upstairs, you will get your ass smote. True dat."





Reply to: