Jump to content

Rescue Linux


willisoften
 Share

Recommended Posts

Having just spent about 2 weeks messing about with my system and having fstab and lilo -v up to my back teeth. I thought wouldn't it be great if I had some sort of rescue disc. Then if I made a mistake in fstab lilo or whatever i could just boot this disc access my root account and edit those files. Now I know there are whole cds full of rescue linuxes and cd bootable linuxes and so on. But all I want to do is be able to boot a disc open vi access my hard disc su to root and edit a few files.

 

Has anybody got any reccommendations? Something quick and simple. Then the next time I move hard disks about I won't have to reinstall.

 

(I wanted to change Lilo before I moved the hard disk the last time but I couldn't run lilo -v "no hard drive attached") Moving the other drives wasn't a problem thanks to help from people on this forum.

Link to comment
Share on other sites

If you boot cd1 of Mandrake, press 'F1', type 'rescue' and select 'Go to console', you will be able to mount the partition on which you want to work and 'vi' it. When I mess with lilo and fstab so much that I can't boot the distro I'm using, this is what I do. Notice that I did it with Mandrake, Gentoo, Debian and SuSe.

 

1) Boot cd1 of Mandrake, press F1 and type 'rescue'. From the menu, select 'Go to console'

2) Mount the partition on which you want to work

mount -t auto /dev/hda* /mnt

3) Change the root (/) to the mounted filesystem

chroot  /mnt  /bin/bash

4) Work on lilo or fstab and run lilo (lilo -v)

5) Exit and reboot

 

Is this quick and simple enough for you :?: :wink:

 

HTH

 

MOttS

Link to comment
Share on other sites

Try knoppix. It's a full featured linux distro that boots from a CD without touching your hard drive. You boot into KDE and can access all your hard drive partitions through the graphical interface. The amazing thing is its hardware detection. On my box, it automatically found and configured my NIC and cable modem and I had internet access after booting from the CD. Check out this link for more info:

 

http://www.knopper.net/knoppix/index-en.html

Link to comment
Share on other sites

Motts: Tried that but no matter what I did I couldn't run Lilo. I was able to get the files edited but it made no difference. I reinstalled. It wasn't too bad as I kept my home partition but it was a nuisance. I've no intention of going through that again if I can help it. The systems sorted at the moment and God willing its going to stay that way!

 

I'll take a look at knoppix. Sounds interesting in its own right.

Link to comment
Share on other sites

Motts: Tried that but no matter what I did I couldn't run Lilo.  I was able to get the files edited but it made no difference.  I reinstalled.  It wasn't too bad as I kept my home partition but it was a nuisance.  I've no intention of going through that again if I can help it.  The systems sorted at the moment and God willing its going to stay that way!

 

I'll take a look at knoppix. Sounds interesting in its own right.

 

Did you give the full path of lilo? Did you type '/bin/bash' after 'chroot /mnt'?

Link to comment
Share on other sites

Motts: To be honest I can't remember, if I have to do it again I'll try it with your instructions and see what happens. At the moment Thunderbirds are go! and its gonna stay that way until, oh say 9.1 :lol:

 

I thought it was time I got me a rescue strategy rather than just booting Windows in a panic to post to this board. I intend to look at all the things mentioned here I absolutely refuse to be caught out again! It's toooo scary. :shock:

Link to comment
Share on other sites

Guest GorGor

willisoften

 

Another alternative for your consideration is to restore your mbr or boot partition using the partimage program from

www.partimage.org

 

From memory there are 3 options,

restore whole mbr

restore partition table and of course

restore any partition you wish.

 

Unfortunately we sometimes choose to have no separate /boot partition. So, try mbr first, reboot and if that fails to do the job you may have to restore / partition.

 

The online dox is here

http://www.partimage.org/doc/index.html

 

Naturally I am a dinosaur so I prefer doing it using the floppy system.

Link to comment
Share on other sites

Swapped my hard drives again! And tried Motts instructions for using Mandrake Rescue it turned out to be a little awkword but it worked!

 

Tom's Reboot downloaded it but I haven't tried it yet.

 

Knoppix I'll try it if I can ever get it!

 

PartImage, I appreciate the suggestion but I'm not into restoring the partition I just want to be able to edit a few config files.

 

bvc: can you explain a bit more please.

 

Paul: I'm downloading the mkcdrec as I type looks very interesting.

 

Apparently DemoLinux is good for this sort of thing too.

Link to comment
Share on other sites

bvc: can you explain a bit more please.
I know your original question pertained to "next time I move a hard disk" but a "Rescue Install" could still apply if on a disk that is not moved. I just find it much more convenient and easier than a boot to a cd and doing chroot /mnt then being limited in tools/apps. I have a 600MB minimal, no X/console only, one prartition (shared swap) install of mdk at the end of my 30GB HD. If I ever screw something up and need to edit a file or replace a fle, want to format/move partitions, install a distro from source code, and many other things I can boot here to do it. If lilo is screwed up (grub doesn't get screwed up very easily) I can boot to it with a bootdisk. It's just a liitle extra sense of security/bkup really....I've seen to many people (including myself) lose everything because they can't access files on a screwed up filesystem or for some other reason.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...