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

Re: software raid 1: how to remove a UUID from a device?



On Fri, Dec 05, 2008 at 02:36:59PM -0600, Boyd Stephen Smith Jr. wrote:
> On Friday 05 December 2008, lee <lee@yun.yagibdah.de> wrote about 'Re: 
> software raid 1: how to remove a UUID from a device?':
> >On Fri, Dec 05, 2008 at 12:40:21PM +1100, Alex Samad wrote:
> >> On Thu, Dec 04, 2008 at 07:10:44PM -0600, lee wrote:
> >> > > On Thursday 2008 December 04 15:15, lee wrote:

> >> whilst booting add init=/bin/bash to the kernel options, or boot up
> >> knoppix or something like it
> >
> >Oh. Does bash run with only the root partition mounted?
> 
> No, but there's few processes running so you can unmount most of the ones 
> that are mounted.  Using fuser or similar tools, you can identify the 
> processes that are keeping the others from being unmounted, shutdown those 
> processes, and unmount the disks.
> 
> I've always been able to go down to / being the only mount point with a 
> real filesystem attached when starting with init=/bin/bash.  If you have 
> to do something to the filesystem mounted on / though, you'll probably 
> want to boot from CD -- the initrd is somewhat limited.

If the kernel starts with init=/bin/sh, then /bin/sh is process number
1.  Unless you start another process, there will be no other processes.
Since you kernel command line's root= will likely include "ro", then /
will be mounted read-only.

You'll have to manually mount what filesystems you need and unmount them
before you halt the system; without init you're running every aspect of
the system yourself.

If at some point you want to boot up normally, you can run 

# exec init

and the init scripts will run.

Note, however, that if you forget and type exit, or Ctrl-D and kill your
sh, the kernel will panic with something about trying to kill init.  If
your disks are mounted rw at this point, you have an unclean shutdown.

good luck.

Doug.


Reply to: