Jump to content

killed /etc - will not boot - please help [solved]


heather1113
 Share

Recommended Posts

I apologize in advance but I had no idea where to put this topic.

 

OK This is my problem. I had a dual boot system with Windows on hda and Linux on hdb but hdb is the slower hard drive and it has been freezing so I decided to get rid of Windows and install Linux on hda and use hdb as an extra drive for backups and such. Nothing that would tax it too much. Well everything went well. I manually set up my partitions (because I don't like how small Mandriva makes root by default) so it is as follows

 

hda1 = root 9.2gb

hda5 = swap 1gb

hda6 = home 28gb (apx.)

 

So I transferred all the data and settings from the old drive to the new and it went wonderfully until I did something VERY stupid. I replaced my /etc on my new setup with the one from the old setup. So now it keeps wanting to boot to hdb because that is what it used to do. I know now why that was dumb but how do I fix it without having to reinstall?

 

Thank you for reading all of this.

 

Please help :help:

 

Thank you in advance.

 

[moved from Terminal Shell Commands, etc by spinynorman]

Link to comment
Share on other sites

  • 2 weeks later...

For future reference, what probably would've solved the problem was probably not as complicated as you think:

 

Boot to installation disk 1 and hit F1 at the prompt. Then type 'rescue' without the quotes. You should then get a menu, one option is 'Mount my partitions under /mnt'. Then choose 'Go to console' At the prompt, type

 

chroot /mnt

 

Then type

 

vim /etc/fstab

Hit 'i' to enter insert mode. Replace all your /dev/hdb<<whatevers>> with /dev/hda<<whatever>>

Hit 'Esc' then type :wq and hit enter.

Then:

vim /etc/lilo.conf

Hit 'i' to enter insert mode. Replace all your /dev/hdb<<whatevers>> with /dev/hda<<whatever>>

Hit 'Esc' then type :wq and hit enter.

Then:

lilo -v

 

Remove the disk and reboot. All should be well.

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...