LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Debian Squeeze: Grub not working (XP removing grub) (http://www.linuxquestions.org/questions/debian-26/debian-squeeze-grub-not-working-xp-removing-grub-789103/)

wearetheborg 02-14-2010 07:08 PM

Debian Squeeze: Grub not working (XP removing grub)
 
On my laptop, I have XP and win 7. I want to triple boot with Debian.
When I install, grub finds win 7 and XP and says everything should be fine, but then when I boot, only debian appears.

This was fixed by doing update-grub2 after logging in.

Now, I have win 7 bootloader as an option. However, when I boot into XP, and then reboot, grub disappers. The screen just says welcome to grub and then a blinking cursor.

aus9 02-14-2010 08:03 PM

hi

Do you have a "recovery partition" on your laptop.... most newer ones do

boot a live cd and post the results of
Code:

su
fdisk -l

pls

ALSO tell us if you see a partition that you can not explain

2) then mount your debian partition and post the output of your /boot/grub/grub.cfg pls

I give an example assuming deb's boot partition (firstly as a sub-folder to /)....last command changes if separate partition
Code:

su
mkdir /z
mount /dev/sda7 /z
cat /z/boot/grub/grub.cfg

if sep partition last line drop the boot from the command

wearetheborg 02-14-2010 08:19 PM

OK: fixed reinstalling grub in rescure mode --- I should have installed to /dev/sda.
But the windows eating uo grub remains.

On doing fdisk -l, I get
Code:

/dev/sda1 (Boot flag on)  NTFS
/dev/sda2                NTFS
/dev/sda3                Extended
/dev/sda5                NTFS
/dev/sda6                NTFS
/dev/sda7                Linux Sawp
/dev/sda8                Linux
/dev/sda9                Linux

My HDD is
1 primary rescure partition
1 primary XP
1 logical win 7
1 logical NTFS data
1 logical ext4 linux /
1 logical ext4 /home
1 logical swap

When grub in installed in rescue mode, it again says vista and Xp detected, but they dont get incorparated into grub.cfg.

However, when I do update-grub2, they are detected and incroporated into grub.cfg

Here are the (abbreviated) windows entries:
Code:

menuentry "Win7 (loader) on /dev/sda1"{
    insmod ntfs
    set root = (hd0,1)
    search  --no-floppy --fs-uuid  --set 3b519a6xxxxxxxx
    chainloader +1
}

menuentry "Win XP on /dev/sda2"{
    insmod ntfs
    set root = (hd0,2)
    search  --no-floppy --fs-uuid  --set fafc53xxxxxxxx
    chainloader +1
}

The XP option actually takes me to the laptop recovery mode.
The win 7 option takes me to the win 7 loader where I can choose both win 7 and XP

wearetheborg 02-14-2010 09:34 PM

Did some more digging.

If I boot into XP (I dont have to log in), then grub gets borked.
If I boot into Win 7, then grub stays fine.

Similar to https://bugs.launchpad.net/ubuntu/+s...rub/+bug/26058
(but there the last poster says that he had to log in to bork grub)

aus9 02-15-2010 04:23 AM

err are you paranoid about showing the full UUID?

if not ...your UUIDs are wrong.


either command below should show them
blkid
ls -al /dev/disk-by-uuid

2) your description does not appear to match your table....but if you truly have a recovery partition that IS the culprit.

either....get rid of all linux partitions and run linux from within windows ...software or emulator
or
destroy your table and create a new table....
----means more work

considering this post about ms latest bork tuesday....heh heh...
http://www.itnews.com.au/News/167237...th-update.aspx

I would be getting rid of ms...but I am biased

wearetheborg 02-15-2010 07:09 AM

Quote:

Originally Posted by aus9 (Post 3864064)
err are you paranoid about showing the full UUID?

if not ...your UUIDs are wrong.


either command below should show them
blkid
ls -al /dev/disk-by-uuid

Not paranoid, just a bit lazy to write down the full uuids
(the laptop linux install is very basic at the moment as I had to do a full reinstall as I could not do recovery the first time around).


Quote:

2) your description does not appear to match your table....but if you truly have a recovery partition that IS the culprit.
What table?
Why does it not match ?
Why is recovery partition the culprit ? Grub gets borked only when I boot into XP, it remains fine if I boot into win7 or linux.


Quote:

either....get rid of all linux partitions and run linux from within windows ...software or emulator
or
destroy your table and create a new table....
----means more work

considering this post about ms latest bork tuesday....heh heh...
http://www.itnews.com.au/News/167237...th-update.aspx

I would be getting rid of ms...but I am biased
What table ?

wearetheborg 02-15-2010 04:41 PM

On reading my drive letters again, it seems that /dev/sda4 is missing in fdisk -l output. Is this normal ?

minrich 02-15-2010 04:47 PM

sda4 is your (optional) fourth primary partition but you extended sda3 to get your logical partitions hda5 ... hda8. Logical partitions always start at hda5 or sda5 - don't worry about it.

aus9 02-15-2010 05:35 PM

hi

in post 3 you show linux swap at end of your list....but its /dev/sda7.....so thats what I refer to a table...so we match your stuff to output stuff.

wearetheborg 02-15-2010 11:32 PM

Oh, sorry, the way I saw it when I partitioned the HDD was:

1 primary XP
1 logical ext4 linux /
1 logical ext4 /home
1 logical win 7
1 logical NTFS data
1 logical swap
1 primary rescure partition

But when I did fdisk -l it said something like the symbols are not in drive order or something like that

aus9 02-16-2010 06:33 PM

yes well partition tools can be misleading....lets run different tools and post their full output pls

I dunno...as I don't have one...but I thought recovery partitions were supposed to be the first ones?

ok so...boot into windows and show us your snapshot....assuming no command tool? of what windows sees pls

2) then run a live cd independent of your distro...such as the most recent sysrecscued.......either fdisk cfdisk sfdisk or snapshots from gparted

3) then boot into linux and lets have look at fdisk and its warnings pls


-----------------

4) Can you remember how you resized for linux and what did you pls in terms of application names running off linux or windows or what pls

Leaping ahead......the old rule was to create partitions for ms....leave the balance blank.....install ms....solves ntfs journal issues....use linux partition tool to do rest....install linux overwriting ntldr

ideally....create a primary /boot PRIMARY partition solves 110% of issues that relate to buggy bios/unpatched bios issues as the second partition.

according to your new info you have 2 primaries but you could have created 3 and had one extended.

Leaping ahead...if you resized and did not reboot to fix ntfs journal entries ....the table may give wrong info?

Leaping ahead....get rid of recovery partition ....create a new table and do clean installs....but that does take forever due to the need to reboot your pc with windows security updates.......heck why not get rid of ms heh heh


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