[gentoo-user] More on mbr
How can I get a real eyes on look at what is in the MBR. I'm trying this: dd if=/dev/hda of=mbr.img bs=512 count=1 Running strings on the result shows a litte of it: strings mbr.img LILO LILOu)^h `UUfP fPYX I thought maybe it could be mounted so: mkdir mbr mount -o loop mbr.img mbr But mount wants to know what `type' filesystem it is. I tried a few things but really didn't expect them to work like: ext2 msdos minix iso9660 None worked of course. So can this be done? Any one know what should be in there exactly and how to view it? What this is all about is that I'm not succeding in overwriting the lilo code mbr by running `grub setup' The grub command succeeds but when I attempt to boot I still get a crippled lilo response. By crippled I mean the dread: Li . . . .Hang forever -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
On Tuesday 20 December 2005 5:45 pm, [EMAIL PROTECTED] wrote: What this is all about is that I'm not succeding in overwriting the lilo code mbr by running `grub setup' The grub command succeeds but when I attempt to boot I still get a crippled lilo response. By crippled I mean the dread: Li . . . . Hang forever I know no way of viewing mbr. I've heard of lilo not being able to overwrite grub, but never vice-versa. Perhaps it would help if you post your exact grub install command. -jm -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
read the reply to your other thread. you installed grub on the first partition, not on the mbr. quite likely this over-wrote something essential to lilo. you can now boot with a boot cd and chroot into your environmment (similar to what you did when installing). From there you can fix either grub or lilo and all should be sweet. On Tue, 20 Dec 2005 17:45:00 -0600 reader wrote: How can I get a real eyes on look at what is in the MBR. I'm trying this: dd if=/dev/hda of=mbr.img bs=512 count=1 Running strings on the result shows a litte of it: strings mbr.img LILO LILOu)^h `UUfP fPYX I thought maybe it could be mounted so: mkdir mbr mount -o loop mbr.img mbr But mount wants to know what `type' filesystem it is. I tried a few things but really didn't expect them to work like: ext2 msdos minix iso9660 None worked of course. So can this be done? Any one know what should be in there exactly and how to view it? What this is all about is that I'm not succeding in overwriting the lilo code mbr by running `grub setup' The grub command succeeds but when I attempt to boot I still get a crippled lilo response. By crippled I mean the dread: Li . . . .Hang forever -- gentoo-user@gentoo.org mailing list -- Nick Rout [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
On Tuesday 20 December 2005 17:45, [EMAIL PROTECTED] wrote about '[gentoo-user] More on mbr': How can I get a real eyes on look at what is in the MBR. I'm trying this: dd if=/dev/hda of=mbr.img bs=512 count=1 I thought maybe it could be mounted so: Just how much of a filesystem do you think you can fit in 512 bytes? (Hint: this email is probably more than 512 bytes.) Any one know what should be in there exactly and how to view it? Have you tries using od or a hex editor? The mbr is mostly binary data used by the bios to locate the right disk offset, read it into memory and start executing it. -- Boyd Stephen Smith Jr. [EMAIL PROTECTED] ICQ: 514984 YM/AIM: DaTwinkDaddy -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
On Tue, 20 Dec 2005 17:59:56 -0600 Joe Menola wrote: On Tuesday 20 December 2005 5:45 pm, [EMAIL PROTECTED] wrote: What this is all about is that I'm not succeding in overwriting the lilo code mbr by running `grub setup' The grub command succeeds but when I attempt to boot I still get a crippled lilo response. By crippled I mean the dread: Li . . . . Hang forever I know no way of viewing mbr. I've heard of lilo not being able to overwrite grub, but never vice-versa. Perhaps it would help if you post your exact grub install command. He has unfortunatle started two threads and the answer is staring him in the face in the reply posted to the other thread. -- Nick Rout [EMAIL PROTECTED] -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
It may be easier to just remove lilo with lilo -U If you cant get the machine to boot so that you can type that, just use a live cd like Knoppix or PCLinuxOS, then make symlinks so that lilo would run. IE: mv etc etc.old ln -s /mnt/etc /etc mv boot boot.old ln -s /mnt/boot /boot then just type lilo -U and it should remove the boot stuff and grub MAY load. I've never actually tried it, but I think in theory it looks good hehe. [EMAIL PROTECTED] wrote: How can I get a real eyes on look at what is in the MBR. I'm trying this: dd if=/dev/hda of=mbr.img bs=512 count=1 Running strings on the result shows a litte of it: strings mbr.img LILO LILOu)^h `UUfP fPYX I thought maybe it could be mounted so: mkdir mbr mount -o loop mbr.img mbr But mount wants to know what `type' filesystem it is. I tried a few things but really didn't expect them to work like: ext2 msdos minix iso9660 None worked of course. So can this be done? Any one know what should be in there exactly and how to view it? What this is all about is that I'm not succeding in overwriting the lilo code mbr by running `grub setup' The grub command succeeds but when I attempt to boot I still get a crippled lilo response. By crippled I mean the dread: Li . . . .Hang forever -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
On 12/20/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I get a real eyes on look at what is in the MBR. I'm trying this: dd if=/dev/hda of=mbr.img bs=512 count=1 Running strings on the result shows a litte of it: There are two things in the MBR: the partition table, and the boot code. The boot code is going to be in machine code, probably built from assembler, so you will not be able to get anything sane from it without an x86 processor manual nearby. The grub command succeeds but when I attempt to boot I still get a crippled lilo response. By crippled I mean the dread: Li . . . .Hang forever Google is your friend: http://www.tldp.org/HOWTO/Bootdisk-HOWTO/a1483.html Although, I think the description is not very clear. What this really means is that the mbr code was able to load the hard disk sectors that it was told contain the stage2 (the larger and more intelligent 'program' that knows about filesystems and consoles and menus and the like.), but the result wasn't executable. How are you installing grub? -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] More on mbr
On Tuesday 20 December 2005 03:45 pm, [EMAIL PROTECTED] wrote: How can I get a real eyes on look at what is in the MBR. I'm trying this: dd if=/dev/hda of=mbr.img bs=512 count=1 I thought maybe it could be mounted so: mkdir mbr mount -o loop mbr.img mbr But mount wants to know what `type' filesystem it is. I tried a few things but really didn't expect them to work like: ext2 msdos minix iso9660 None worked of course. So can this be done? Any one know what should be in there exactly and how to view it? The MBR isn't a partition itself, it merely stores the partition information. As I understand it (and if somebody else has better info, or I've got things backward, please correct me), the MBR is the first 512 bytes of the disk. The first 446 bytes of it is the bootstrap loader code itself - the actual workhorse that starts the system up to load the OS. The rest of it (66 bytes) is the core partition information for the disk. Overwriting this part of it will wipe out your partition table - not something you want to do. The book Linux Desktop Hacks has a section just on saving, fixing and restoring the MBR. Rather than using bs=512, you'll want to use bs=446 when overwriting the MBR (if you had a backup, and want to do it by hand), or use a tool like grub-install (the Gentoo Handbook has a chapter on configuring the bootloaders - LILO or GRUB - part 1, chapter 10). Good luck. -- Eric Bliss systems design and integration, CreativeCow.Net -- gentoo-user@gentoo.org mailing list