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

Re: boot from rescue into single user or with no modules loaded

Ian Thomas <ipthomas_77@yahoo.com> wrote:

>     It never finished booting.  I was able to log in
> only once.  There Iused vi to edit the lilo.conf file.
>  I used ctrl-r to refresh the screen when the
> modprobes fell like rain.  I must not have done
> something correctly.  The kernel does not load all the
> way.  I need a way to unload all the modules before
> booting or going into single user, from a rescue
> cd-rom or boot disk.
> Ian


It sound like you either have a bad "rescue" disk or are using it
improperly and it is somehow trying to boot off your installed config
and the paths to the required modules has not been set.  Lets go back to

Any "rescue" disk should be self-contained and NOT depend upon any files
on your HD.  The "rescue" and "root" disks in the Debian boot-floppy set
are examples of such.  These disks will boot off your computer's floppy
drive into a minimal Linux and will automatically start the install
process.  Any needed modules (usually none) should already be on these
disks and/or compiled into the kernel on these disks.  If you don't have
these disks already made, they should be available on the CDROM with
instructions on how to make them.  The same thing goes if you use the
CDROM to boot up to the start of install.  There are other disk sets /
CDROMS around that will do the same thing for "rescue" purposes. 
Personally, I use the GNU PARTED disk frequently for this purpose, but
anything that allows you to get to a Linux root command prompt will

If you use the Debian "rescue"+"root" floppies, or the CDROM to get to
the start of the install sequence (question about config of the
keyboard), you can press <ctrl><alt><F1> to get to a command prompt, or
scroll down the list of thing "to-do" until you find the command prompt
or "shell" option.  At this point you are still running off the

However you manage to get to the root command prompt, the next thing you
have to do is mount the HD partition that contains your Linux install,
so you can access it and make the changes.  I usually cd to /mnt and
create a new directory called "linux".  This then becomes my "mount
point".   I then mount my HD partition under this (mount -t ext2
/dev/hda3 /mnt/linux).  I then cd to /mnt/linux and look around to make
sure it is what I wanted to be mounted and can find the things I want to

At this point there are a couple of "gotchas".  Your system is currently
running with the "root" directory (/) on the floppy drive or CDROM! 
This has a couple of implications:

1.  Your editors and shells are limited to whatever is on the "rescue"
disk...usually bash or ash for shells and vi for the editor.  This poses
some new problems for you if you are trying to edit your lilo.conf file
because of possible unfamiliar shell or editor commands.

2.  If you try to run "lilo" it will try to run if off the floppy and
will look in the floppy's /etc for lilo.conf & probably won't find it!

The secret out of some of this is to make your newly mounted HD
partition the "root" directory using the "chroot" command....(chroot
/mnt/linux).  Now if you run lilo, it should find your correct
/etc/lilo.conf file and re-write the MBR accordingly.  Once you have
done this, enter exit to get back to the floppy's root system, unmount
your HD, then re-boot your system.

This should fix it up for you.


-Don Spoon-

Reply to: