LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lost Linux boot and boot floppy doesn't work (https://www.linuxquestions.org/questions/linux-newbie-8/lost-linux-boot-and-boot-floppy-doesnt-work-325346/)

marquedios 05-20-2005 08:11 AM

Lost Linux boot and boot floppy doesn't work
 
Ok, heres my issue. I installed RedHat 9.0 last night, woke up this morning to do the walkthrough on making ntldr boot linux through lilo located here: jaeger.morpheus.net/linux/ntldr.php. So I followed it almost to the tee but got quite confused on installing lilo to root. Now the reason I can't access linux is because 1) I messed up in making the bootsect.lnx which now points straight back to my C:\ and I don't have lilo installed at all :(. I'm working on an 80gig western digital and my ~ partition table is as follows:

256megs (primary) = Fat16 (windows 98 dos)
5gigs (first logical in extended) = NTFS (windows 2000 adv server)
102megs = ext3 (/boot)
44gigs = ext3 (/home)
7gigs = ext3 (/)
1gig = swap
~16gigs = freespace

Now, my main question. Does anyone have a better link for a walkthrough and me secondary question, if I boot from my RedHat 9 CD(s) can I recover and reinstall lilo?

Thanks in advance.

syg00 05-20-2005 09:00 AM

Re: Lost Linux boot and boot floppy doesn't work
 
Quote:

Originally posted by marquedios
Now, my main question. Does anyone have a better link for a walkthrough and me secondary question, if I boot from my RedHat 9 CD(s) can I recover and reinstall lilo?
Hard to know what you did - or didn't do.
Quite likely you have everything in place (somewhere), and only need to get the commands right.

Link looks o.k., except it doesn't really explain how to get the file you create across to your Windoze partition.
As for re-doing lilo, search LQ for "chroot and sysimage". Should work all the way back to RH9 I would think.
Whilst in the mood for searching, look around for instructions on doing this setup here on LQ - been asked a zillion times.

marquedios 05-20-2005 09:49 AM

DOH!!! I guess I should have been a bit more specific on the commands I tossed at linux. Well, to create the bootsect.lnx file I sent it the command "dd if=/dev/hda1 of=bootsect.lnx bs=512 count=1", but the problem with this is when I select the line that I added to my boot.ini after placing that .lnx file in my C:\ (which I mounted since linux by default can read fat 16) it pointed it straight back to boot loader creating a circle. This is my actual main problem and the other is that there is no boot loader installed on either /boot or / in linux to start vmlinuz :(. Too bad I'm at work otherwise I'd attempt to enter a shell (which I'm fairly sure I can do by booting off the CD) and installing lilo again to try and recover this error without doing a completely new linux install.

mlangdn 05-20-2005 11:53 AM

If lilo is configured properly, you can boot to a shell with the first installation cd. Then run lilo. However, that will install lilo to the mbr. May not be what you are looking for, but it is very effective. At least you will have dual-boot.

I have lilo installed to the mbr and I am running 5 different OS's.

syg00 05-20-2005 04:36 PM

You dd'd the boot sector record of your Windows partition. This will never work.

Leaving aside the issue that grub (even lilo) installed to the MBR is a much more flexible option, some observations:
- Linux boot loader must be installed - here it has to be to a partition if you want to preserve the Windows loader.
- the boot sector record of that partition has to be copied to the Windows C: drive.
- Linux does not have to be re-installed. Reboot from CD1 and chroot into your disk install and re-install lilo (in need). As I said a search will show how.

It's probable you installled to /boot, so that would likelly be "dd if=/dev/hda3...", maybe to root(/) - in which case try "dd if=/dev/hda5..."

marquedios 05-21-2005 06:51 AM

Right dd'ing my C:\ was a terrible thing and I realized what I had done after I uninstalled Lilo. I did it in the morning right before work, so I didn't have time to even boot from the CD (which I just did and did as you said about chrooting into my drive).

I don't doubt that lilo is a very nice bootloader, but my delemna is that I'm a student and I like to terminal/telnet/ssh into my computer on both my Windows and linux drive (depending on what class I'm in) to upload/view/change things on my home computer as I learn them. But I made the mistake the other day in windows of changing something that required a reboot which wouldn't have been a problem if I weren't dual booted. Having linux as my default OS to boot to it went into linux and at the time I hadn't quite figured out all the command lines/locations of config files (plus i missed the class on telnet/ssh and had no idea that it runs by default if installed on a linux box.) So I didn't know how to get into my box again and was stuck.

With the layout of my system its just easier using the boot loader which is located on my FAT16 drive (which both linux and windows can read with little to know configuration changes). So to me this is a more flexible option once I figure out how to get this thing to work properly with the windows boot loader.

marquedios 05-21-2005 12:16 PM

Ok, finally got it working. I read that walkthrough again and found out that I had never changed the line in my lilo.conf "boot=/dev/hda" hence the reason my lilo kept putting itself on the MBR rather than my / file system. So I changed that line and reinstalled lilo and presto viola, it all works now :D.

Thank you all for your help.

syg00 05-21-2005 04:39 PM

Happy to help.
It is always an option to have the two boot-loaders linked. I do that on this laptop, so if I miss the time-out, and go to the other loader, I can always get back.
Don't need to use it often, but have occasionally - handy, and easy to set up.

Also be aware that every time you rerun lilo (kernel update, config file update), you'll have to dd the boot sector record again. Grub doesn't suffer from this - was the reason I changed years ago.
How often you do updates/upgrades determines which loader you maintain in the MBR - most Windows users start with ntldr, and drift to one of the Linux ones. Myself included (note the grub recommendation when you do).

Also suggest you try a more recent distro - RH9 is showing its age.

marquedios 05-22-2005 10:19 AM

I may update my distro later, however the classes we're taking now are teaching us in RH 9. Besides I'm still quite a linux newb. Once I finally drift away from gaming even more I see myself becoming much more of a linux user rather than windows. Been trying to find an excuse to use linux rather than windows now for about 3 years, but the time it takes to learn linux has made me stick with what I know.

Would you suggest another RH distro? If so, what IS the latest, lol? I mean, hell, I've just dipped into linux usage, but so far so good really, especially now that I actually have a decent book to teach me some secrets and have some basic understanding of the most used command lines.

syg00 05-22-2005 02:21 PM

RH9 is fine to learn on, so long as you don't need to support any of the latest and greatest hardware.
Redhat as a free distro is no more - Fedora Core is the community supported successor. FC3 is current I think, with FC4 in the wings.
I don't like to recommend anything specific - try a few and see what you like. Have a look at any of the hundreds of "What's the best distro ???" threads.
Probably won't help you decide, but will show how ardent some (most ???) people are about their chosen distro.


All times are GMT -5. The time now is 10:56 PM.