View previous topic :: View next topic |
Author |
Message |
el Dopa n00b
Joined: 06 Nov 2003 Posts: 15
|
Posted: Fri Jan 02, 2004 8:54 pm Post subject: what kind of data does making a partition bootable write? |
|
|
I decided to start from the ground floor; I think I've got some inconsistincies in bios that I wanna work out and then do a clean install from there. So I repartitioned and re-initialized the filesystems on my hdd. From here I was planning on fiddling with CMOS, and rebooting when it gave me the usual unable to find bootable os or whatever error-- to fiddle some more. This way I don't have to boot the os and shut it down repeatedly.
However, I don't get the error I was expecting: instead, Gentoo begins to boot, failing at "Kernel Panic: no init found".
ls -a shows hda1 as empty, except for an empty lost+found directory.
Where is it getting the data it's using to do this? I thought I had wiped the drive. Is it from making /dev/hda1 bootable?
I don't have the other data that precedes the kernel panic error, but it includes things like listing i2c version info (which I didn't have in my old kernel anyway), pci-hotplug version info, IP protocols available, and a couple of "FAT: bogus logical sector size:0" errors (are these errors?)
what am I missing? _________________ <no custom signature for today!> |
|
Back to top |
|
|
sfaulconer n00b
Joined: 06 Aug 2003 Posts: 48
|
Posted: Fri Jan 02, 2004 9:19 pm Post subject: Re: what kind of data does making a partition bootable write |
|
|
Most likely, you installed GRUB/LILO to the MBR, or Master Boot Record. It is a small space at the beginning of the drive that tells the system how to boot. Both GRUB and LILO have a way of removing themselves from the MBR, but you'll need to look at man to figure it out (or someone else answers) since I don't have access to a Linux box at the moment.
Hope that helps. _________________ SMF |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Fri Jan 02, 2004 9:23 pm Post subject: |
|
|
el Dopa,
The master boot record (MBR) contains the first stage boot progam and a flag to say if its allowed to be booted or not. This is not affected by destroying the partition information and filesystems, since its not considered part of any filesystem.
If you really want to trash the MBR and you only want to do this is if you are prepared to loose all the data on the drive do
Quote: | dd if=/dev/zero of=/dev/hdX bs=512 count =1 |
Change X to the hdd of your choice. This wipes the partition table too, so everything is gone.
I guess you were using LILO as a boot loader. LILO keeps a list of sectors to load. It doesn't mind if there is a directory entry pointing to them because the filesystem is not mounted, so it can't read any directories. You have destroyed all of the operating system pointers and marked the space free but the data is still there and being read.
That dd command only writes a single block. To wipe the whole drive omit the count= parameter. It will then fail with an error when it tries to write off the end of the drive. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
el Dopa n00b
Joined: 06 Nov 2003 Posts: 15
|
Posted: Fri Jan 02, 2004 11:33 pm Post subject: |
|
|
Thank you. I do remember reading something about LILO and the MBR somewhere...
Next question: When does LILO write to the MBR? For example, the info about pci hotplugging and i2c confused me because my latest kernel did not have those features compiled in. I'm guessing that the MBR was written to with one of my earlier kernel compiles, and I missed a step when I made the most recent one. (This might explain some of my other problems as well...) If this is so, which step did I skip? _________________ <no custom signature for today!> |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sat Jan 03, 2004 12:01 am Post subject: |
|
|
el Dopa,
Lilos write the MBR every time its run - if you have it installed on the MBR. You must run it every time you update your kernel because the kerenl moves about on /boot and Lilo does not use the filesystem to find it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
el Dopa n00b
Joined: 06 Nov 2003 Posts: 15
|
Posted: Sat Jan 03, 2004 12:45 am Post subject: |
|
|
thank you. I'll keep that in mind. _________________ <no custom signature for today!> |
|
Back to top |
|
|
|