# uname -a Linux notebook 2.6.11-gentoo-r11 #5 Sun Jul 3 16:16:32 GMT 2005 i686 Intel(R) Pentium(R) M processor 1.60GHz GenuineIntel GNU/Linux After the last kernel update gentoo did not boot no more and I had to re-install GRUB (and was wondering why). Now gentoo boots but XP on another partition does no more. This may be the same problem as described here: http://www.redhat.com/archives/fedora-devel-list/2004-May/msg00908.html I cannot even start the Windows recovery CD. This applies to Windows installed on a notebook, i.e. I have a special recovery partition at the very beginning of the hard drive, before the XP drive. This may be the cause why the simple command suggested in the redhat doc above does not work out-of-the-box: # sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda Disk /dev/hda: 9663 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 0+ 2- 3- 16384 12 Compaq diagnostics /dev/hda2 * 2+ 4963- 4962- 39853639 7 HPFS/NTFS /dev/hda3 4963+ 4967 5- 35405+ 83 Linux /dev/hda4 4979 9662 4684 37624230 5 Extended start: (c,h,s) expected (1023,254,63) found (1023,0,1) /dev/hda5 4979+ 9531 4553- 36571938+ 83 Linux start: (c,h,s) expected (1023,254,63) found (1023,1,6) /dev/hda6 9532+ 9662 131- 1052226 82 Linux swap / Solaris start: (c,h,s) expected (1023,254,63) found (1023,1,1) New situation: Units = sectors of 512 bytes, counting from 0 Device Boot Start End #sectors Id System /dev/hda1 63 32830 32768 12 Compaq diagnostics /dev/hda2 * 32831 79740108 79707278 7 HPFS/NTFS /dev/hda3 79740109 79810919 70811 83 Linux /dev/hda4 79987635 155236094 75248460 5 Extended /dev/hda5 79987703 153131579 73143877 83 Linux /dev/hda6 153131643 155236094 2104452 82 Linux swap / Solaris Warning: partition 1 does not end at a cylinder boundary sfdisk: I don't like these partitions - nothing changed. (If you really want this, use the --force option.) Reproducible: Always Steps to Reproduce: 1. 2. 3.
jakub, with all due respect, I still think that this is by far not a "normal" problem.
Not a kernel problem, kernel is not involved with booting other OS.
I cannot think that that link is related if you did not repartition the harddrive?
To be honest, you're probably better off finding a way to do the following: A) Nuke the recovery partition. A manufacturer's general idea of "Recovery" is format and factory reset. These cause more problems than they're worth. B) Boot a Windows XP Setup CD, drop to Recovery Console, run "fixmbr" to restore the Windows XP Bootloader to the MBR. C) Once you've verified XP to work again, focus on fixing the Linux Partitions, and get Grub/Lilo to play nice with XP. As this goes beyonds the bounds of Gentoo, I'm marking as invalid. If you can pin the problem to actually being caused by a Gentoo process (running lilo/grub install, or something done via emerge, or a flaw in the documentation), then feel free to re-open.
Yes, I also though about nuking that recovery partition but I'm not sure whether this will solve the problem since the XP CD does not even start right now, I don't even get to the recovery console. And have no idea why this is the case and I don't think that this problem will go awat just by nuking the recovery partition. What I did was # emerge -u world (actually kernel update) # make && make modules && make modules_install # cp bzImage /boot/kernel-andsoon # cp System.map /boot/System.map-andsoon # reboot -> gentoo would not boot no more (didn't try XP) # grub_install /dev/hda -dont_remember_exact_settings -> gentoo boots, XP does not I don't understand why I even had to re-install GRUB.
if your system doesnt boot from CD that has nothing to do with linux/grub but rather with your bios settings us trying to debug your system remotely isnt too viable; your best bet is to debug it locally or try and find someone who experienced a similar problem on http://forums.gentoo.org
The reason I comment that those recovery partitions are more trouble than they're worth is usually because they're non-standard. I've never seen a tool that creates a "Compaq diagnostics" type of partition. In the few systems that I've seen them on, I've never seen a tool that activates them. Probably because I don't bother to read the documentation that came with the system. AFAIAC, a x86 box is an x86 box, and Windows XP is Windows XP. They should behave the same regardless of manufacturer or system design, although this is not always the case (especially with laptops). If you use a standard partition layout capable of dual booting, it usually looks something like this: Device Boot Start End Id Type /dev/hda1 Y ??? ?? 7 NTFS /dev/hda2 N ??? ?? 5 Extended /dev/hda5 N ??? ?? 83 Linux Native /dev/hda6 N ??? ?? 82 Linux Swap Use lilo (it's not as pretty as grub, but it gets the job done), let it override your XP bootloader (NTLDR), and let it manage booting off of /dev/hda5 for Linux, or chain-load /dev/hda1 for XP. OTOH, you can install something like lilo/grub into /dev/hda5's header (instead of /dev/hda's MBR), and use NTLDR to chainload a linux install (by editing C:\boot.ini; google for a HOWTO on this for better info). With regards to the recovery CD, you're not specific on why it doesn't load, so I surmise the following things: A) The CD is damaged B) The XP install is toasted, so Recovery Console (if you get that far) finds nothing to fix C) BIOS settings are fubar You might also try visiting www.bootdisk.com, get 6 fresh floppy disks, and download the WinXP bootdisk set (it takes 6 floppies). This will boot the equivalent of the WinXP setup program that lets you activate the Recovery Console. Also, looking at the command listing you give, if copying System.map and rebooting were the final two commands you did, then it's likely something ate your MBR, bootloader, or XP partition at a previous point. That or you just overwrote your main, booting kernel (never a good idea, always keep a working backup), and thus when you tried to reboot, the new kernel was bad, and didn't boot. The listed RedHat bug also is a year old, and I imagine is one already squashed in the kernel, if it is a kernel problem, or was fedora-specific, and squashed there. If this had been a bonafinde, reproducable problem on gentoo systems, you would not be the first to report it.
CDs are ok I don't get to the recovery console and I didn't touch BIOS settings...
I have seen XP behave like this before if it do not like something about the partition tables ... it will just lock at a certain point (sometimes before even getting to the 'blue setup dialog' part ... sorry, havent done it in a while).
Hmm, I cannot even mount the XP parition: notebook ~ # sfdisk -l /dev/hda Disk /dev/hda: 9663 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/hda1 0+ 2- 3- 16384 12 Compaq diagnostics /dev/hda2 * 2+ 4963- 4962- 39853639 7 HPFS/NTFS /dev/hda3 4963+ 4967 5- 35405+ 83 Linux /dev/hda4 4979 9662 4684 37624230 5 Extended start: (c,h,s) expected (1023,254,63) found (1023,0,1) /dev/hda5 4979+ 9531 4553- 36571938+ 83 Linux start: (c,h,s) expected (1023,254,63) found (1023,1,6) /dev/hda6 9532+ 9662 131- 1052226 82 Linux swap / Solaris start: (c,h,s) expected (1023,254,63) found (1023,1,1) notebook ~ # mount -t ntfs /dev/hda1 /mnt/ mount: wrong fs type, bad option, bad superblock on /dev/hda1, or too many mounted file systems
If the partition geometry is off, then you're really in a bind. It's not easy to repair that. I tried once (long ago) to install Solaris/x86 when it was in its initial releases, and for some odd reason, the installer touched ever so lightly the partition layout on /dev/hda (it was supposed to install only to /dev/hdb). End result: Win98 didn't load automatically. Took me 12 hours, working in partition magic and using a partition calculator to determine what the correct offsets were and repair them. Not fun by any means. btw, according to your disk layout, mounting /dev/hda1 is expected to fail. There's nothing WinXP about it -- it's the diagnostics partition. There's likely no normal filesystem on it. You should've tried mounting /dev/hda2, and made sure your have NTFS read support built into the kernel (NTFS Write supportis dangerous).
Partition Table for /dev/hda ---Starting--- ----Ending---- Start Number of # Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors -- ----- ---- ---- ---- ---- ---- ---- ---- ----------- ----------- 1 0x00 1 1 0 0x12 11 8 2 63 32768 2 0x80 11 9 2 0x07 254 63 1023 32831 79707278 3 0x00 254 63 1023 0x83 254 63 1023 79740109 70811 4 0x00 254 63 1023 0x05 254 63 1023 79987635 75248460 5 0x00 254 63 1023 0x83 254 63 1023 68 73143877 6 0x00 254 63 1023 0x82 254 63 1023 63 2104452 Partition Table for /dev/hda First Last # Type Sector Sector Offset Length Filesystem Type (ID) Flag -- ------- ----------- ----------- ------ ----------- -------------------- ---- 1 Primary 0 32830* 63 32831*Compaq diagnost (12) None 2 Primary 32831* 79740108* 0 79707278*HPFS/NTFS (07) Boot 3 Primary 79740109* 79810919 0 70811*Linux (83) None Logical 79810920 79987634 0 176715 Free Space None 4 Primary 79987635 155236094 0 75248460 Extended (05) None 5 Logical 79987635 153131579 68# 73143945 Linux (83) None 6 Logical 153131580 155236094 63 2104515 Linux swap / So (82) None
I booted from CD and when attempting to mount the NTFS partition is prints that the boot partition sector is invalid. So I did a mount -o errors=recover and was able to mount the partition. 1) regarding the above command's output: I'm not sure whether it did fix it or was using a backup (it seems NTFS holds an backup). Anyway, is it safe to execute the command with rw support for NTFS enabled in order to permanently fix it? 2) this doesn't work from my regular on-disk install. Mount print nothing about an invalid sector and -o errors=recover also doesn't work (?). Well...what is the difference between mount on live CD and mount on hard disk?
I was able to fix it: mount -w -o errors=recover /dev/hda2 /mnt/foo