LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-01-2004, 06:34 AM   #1
dochyde
LQ Newbie
 
Registered: Jul 2002
Distribution: Debian/Slackware
Posts: 5

Rep: Reputation: 0
Lost boot


Hi all,

I am running Debian/Testing distro and I am very very pleased about this operating system.
Actually my serv is Debian and my workstation is Slack.

I actually changed boot loader from GRUB to LILO and kind of forgot what was ongoing as a friend called me up to go party.
I come back and need to reboot > so I reboot

But.....I did not set up any boot loader > and of course no floppy backup > I will do next time btw!!!
So here I am reading on how to restore boot loaders:
Got woody cd > rescue root=/dev/hde3
>>>>>>> hde is a SATA drive > not detected by woody ;(
>>>>>>> No luck for this.

So I told my self might try Sarge CD
>>>>>>> No luck either > it does not have a rescue boot > So my next question is: what kind of operating system don't ship a rescue for it?! Even windows has a restore menu with there cd!

So now I am lost.
I do not know what else can be done > I can't imagine that the only solution to my problem is to reinstall > I am not using windows!.
I have a neetly configured server and would really hate to have to reconfigure everything.

Thank you very much for your help.


Cheers


dochyde
 
Old 09-01-2004, 07:59 AM   #2
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
I keep a Knoppix CD handy. If you boot up a live CD, you can chroot to your Debian system and reconfigure the boot loader. If you have a live cd, boot with it and mount the root partition of your Debian install (like at /mnt/hde3), then enter the command "chroot /mnt/hde3". You are then running as root on the Debian install and can redo to boot loader
 
Old 09-01-2004, 09:04 AM   #3
dochyde
LQ Newbie
 
Registered: Jul 2002
Distribution: Debian/Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
I logged in with DSL (damn small linux - as I had that under my sleeves)
here is what I did:

#mount /dev/hde3 /mnt/hde3 <= this is my / partition
#mount /dev/hde1 /mnt/hde1 <= this is my /boot partition

I copied all the files in /mnt/hde1 to a new dir just created in /

#cp -r /mnt/hde1 /mnt/hde3/boot
#chroot /mnt/hde3

then I tried running liloconf > error message complaining about io, kernel and partitions missing.
Same thing when I edit my lilo.conf

what can I do?
 
Old 09-01-2004, 09:58 AM   #4
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
Well, in my case by /boot and / are on the same partition, but I don't think you should copy your /boot partition. I think you should be able to mount it as normal from the chrooted environment and run lilo as normal. However, I've never done this, so someone else here may give better advice.
 
Old 09-02-2004, 06:34 AM   #5
dochyde
LQ Newbie
 
Registered: Jul 2002
Distribution: Debian/Slackware
Posts: 5

Original Poster
Rep: Reputation: 0
Got it working guys!
Here it is:

First step is to boot from another source. The trick for me was to also get my nforce chipset detected and my SATA SiImage controler detected as my boot was on that drive.
So I downloaded a great Live CD from this site:
>> http://www.sysresccd.org/

Booted on that CD. BTW this cd detects a whole load of hardware and it would freeze up on network detection so I disabled it.
# fb1024 cdcache nonet > kernel with framebuffer support / cdcache=will cache the 100MB system in memory so you can umount your cdrom drive / nonet=no network detection.

Odly enough once it was booted up doing a 'lsmod' would show my network card module 'nvnet' as loaded ok. Funny thought I had disabled network?.

So first thing to do is create a mount point:
# mkdir /mnt/hde3

then mount that device:
# mount /dev/hde3 /mnt/hde3

chroot to your new partition; On my cd again there was a trick. When launching 'chroot' I would get an error message about /bin/zsh. The trick is to change shell or else it does not work.
# SHELL=/bin/sh
# set $SHELL
to check if you have successfully changed the shell just type 'env' and check the SHELL variable.

# cd /mnt/hde3
# chroot /mnt/hde3

Very important now to mount all your partitions. I was forgetting that point.......
# mount -a

to check if your partitions are mounted juste type 'mount'

then run liloconf
# liloconf

everything went ok on that script except for the last (never the less important) part: writing the boot in the MBR.
I would always get an eror saying something like:
# ERROR - install-mbr > could not install MBR > ....blablabla....

OK....almost there but not quite.
So I checked out the different options in lilo
# lilo --help

And found the commande to write boot record in MBR
# lilo -M /dev/hde

And it worked!

Hope this will help out other users.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lost priviledges to boot castortroy Red Hat 5 10-26-2005 10:27 AM
Lost Linux boot and boot floppy doesn't work marquedios Linux - Newbie 9 05-22-2005 02:21 PM
Red Hat 9.0 Wont Boot Lost Boot Disk! AndrewBalmos Linux - Newbie 8 01-05-2004 07:06 PM
Boot loader lost. Need help? BEYAZITTOSUN Linux - Software 1 11-15-2003 02:30 PM
Boot Magic Lost cauge Linux - Newbie 3 11-10-2003 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration