Link to home
Start Free TrialLog in
Avatar of Develprog
Develprog

asked on

Grub doesn't appear for a multiboot Debian & Wndows Xp

Hi,

I had a pc with Xp installed and I install Debian on it and everything
was good because Linux installed Grub Legacy.
I was able to boot on Grub and choice between Linux and Windows.

But now when a boot my pc I have a black screen asking me to press a key
when boot device is choice

I had in sda7 my linux root
and in sda1 the windows XP

So the only way that I can boot is on Windows by set the boot flag on sda1 with Gparted.

How can I resolve this multiboot problem is my menu.lst grub configuration faulty

I attached the menu.lst of grub and information about my present system on this pc.

When I had this problem the config of menu.lts of grub was like this:

..
root            (hd0,5)
kernel            /boot/vmlinuz-2.6.18-6-686 root=/dev/sda6 ro
..

I changed to :

..
root            (hd0,6)
kernel            /boot/vmlinuz-2.6.18-6-686 root=/dev/sda7 ro
..

Because my Linux is on sda7 but it still fails to boot.


I retrieve some info about my system with a repair-boot-cd (see attachment)
I'm afraid to loose my linux partition, so I had already save my 512 bytes MBR
but is it enough to restore a lost partition ?

How it will be possible to get back multiboot, is this with the menu.lst of grub ?
what is for chainloader      +1 ?

Thank you
Boot-Info-2012-09-05--21h56.txt
menu.lst
SOLUTION
Avatar of Darr247
Darr247
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Develprog
Develprog

ASKER

Hi,

I have set the boot flag into into my Linux partition (sda7) and during my computer opening I press 'shift' button but I still can't boot on it I have this message on black screen :

"Reboot and select proper Boot Device
or insert Boot Media in selected Boot Device an press a key"


The problem is that I can't boot into my Linux partition (sda7) in which I have a Debian distrubition (and for this version it was Grub Legacy) to run the command:
$ sudo update-grub


So I decided to use a repair cd named "Rescatux" that include Gparted, Super Grub2 Disk)
when booting with this I do an "Update Grub configuration"  and it ask my which partition

- sda7
- loop

So I choose sda7 and update was good done but when I reboot I still have
the same message  and grub doesn't appear and I can nor run my Debian.

I don't have internet connected to this pc, so What can I do ?
Knoppix or other ?

Thanks
$ sudo update-grub is a grub2 command.

Do you have a bootable Debian install disk?

You should be able to reinstall grub, if not repair it, using the Debian install disk.
The SuperGrub disk should be able to do it, too... but I don't know my way around its GUI.


Follow the instructions at http://www.debian.org/releases/stable/i386/ch08s07.html to get to a prompt (select /dev/sda7 for the location of your linux install)... in the shell, run the commands.

$ sudo grub
grub> root (hd0,6)
grub> setup (hd0)
grub> quit
$ exit

When it reboots you should get your grub menu again.
I think so with supergrub disk but if I remember it recommend to backup data before
install grub.. Is it possible to lose the sda7 partition although I have a img of sda MBR ?

So I decided to look to other solution, without risk.

>>When it reboots you should get your grub menu again.
Will Grub take care about the existant Windows XP partition ?

Thanks
> Is it possible to lose the sda7 partition although I have a img of sda MBR ?

It's possible to do that without repairing grub... repairing grub should not do anything to your partition structure, though.

Microsoft actually recommends you do a complete backup of your system before applying the monthly updates they issue, too.

> Will Grub take care about the existant Windows XP partition ?
You have your menu.lst backed up (it's attached to the first message, above), and it should work as it did before once the grub setup directs the MBR to make a pointer at grub in /dev/sda7/boot/grub/ again.
So I tried with a Debian Install Cd by booting in recovery mode.

So I choose to install grub but the tool doens't propose me location like /dev/sdaX
but strange thing like loop.. part1, loop0....part2 -> part7

Anyway I found the way with prompt command but after installing grub on sda7, the recovery tool ask me to partition the disk for sure I don't partition it and so I finished at this step.

When rebooting still this message:
"Reboot and select proper Boot Device
or insert Boot Media in selected Boot Device an press a key"

Which tool must I used and how ?

thanks
If you followed the instructions at http://www.debian.org/releases/stable/i386/ch08s07.html you should have been chroot'd into the hard drive's file system, not looped to the CD.

Then the grub setup would have been done on hd0, with hd0,6 selected as grub's root.

Is that what you did?
Hi,

For now it is ok for grub I have
it on boot the problem was that
I tried to grub install but with no correct mounts
so I made this with the Debian install cd and when
at point of partitioning I opened a new consol (ALT+F2)
Than I did what you said and now I have the Grub.

But unfortunatly when in grub a choose my system
it shows me a error 17

"
    Booting 'Debian GNU/Linx, kernel 2.6.18-6-686'

root (hd0,5)
  Filesystem type unknown, partition type 0x082
kernel  /boot/vmlinuz-2.6.18-6-686 root=/dev/sda6 ro acpi=off

Error 17: cannot mount selected partition
"

But it seems strange because I run these commands:
$ sudo grub
grub> root (hd0,6)
grub> setup (hd0)
grub> quit
$ exit

So again I used Rescatux to update grub configuration to sda7 but still same error.

So what is wrong ?
82 is type linux swap.  That's not a bootable partition.

Edit menu.lst and change
root (hd0,5)
to
root (hd0,6)
Hi,

I did like you say change:
root (hd0,5)
to
root (hd0,6)

Seems ok when in grub boot, I choose  my system
but just after severals auto scripting the system hangt
in initramfs, and the errors I see are in mount procedure
sda6  no such file or directory.

In the menu.lst I see  something like
root            (hd0,6)
kernel            /boot/vmlinuz-2.6.18-6-686 root=/dev/sda6 ro

So I change sda6 to sda7 ?

After reboot the system boot doesn't hangt  
but show that Activating swap... failed
and after that it has perform a check on root then reboot

Now I'm happy to see my Linux destkop :) it is ok but at each boot I see:
Activating swap... failed

How fix it ?
Ok the system runs well
but when I perform a shutdown

it runs severals scripts :

     Shutting down ALSA ... done.
     ...
     Stopping NFS common utilities: statd.
     ...
     Will now halt.
     Syncronizing SCSI cache for fdisk sda:
     usb 1-2: new ....
     .....
     System halted.

but at this point it fails:
      ....
      hub 1-0:1.0: hub_port_status failed (err = -108)

what would be the problem ?

Because I performed this command: mount -t ext3 /dev/sda1 /mnt
to change my menu.lst after doing job I do a: umount /mnt/boot
but this last command does not run well.
Is the problem due to not perform a unmount?



Thanks
All it should take is
# umount /mnt
not
# umount /mnt/boot

i.e. you umount the same point that was mounted


What does your /etc/fstab file contain?
e.g.
# cat /etc/fstab
I tried too umount /mnt ..

In my current Debian system
When trying acces to my  Windows partitions,
I have these messages box:

' hal-storage-fixed-mount refused uid 1000 '

Which seems normal when I look at
the etc/fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda6       /               ext3    defaults,errors=remount-ro 0       1
/dev/sda7       none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0


so my windows partition are in sda1 and sda5 how to add in the fstab ?

Thanks
Hmmm... something's not making sense; please show us the output from
# fdisk -l
(that's a lower case L, as in list)... or
$ sudo fdisk -l
the content is:

root:/home/user# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       22556   181181038+   7  HPFS/NTFS
/dev/sda2           22557       60801   307202962+   f  W95 Ext'd (LBA)
/dev/sda5           22557       56986   276558943+   7  HPFS/NTFS
/dev/sda6           56987       57129     1148616   82  Linux swap / Solaris
/dev/sda7   *       57130       60801    29495308+  83  Linux

Disk /dev/sdb: 2048 MB, 2048901120 bytes
64 heads, 63 sectors/track, 992 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         992     1999749+   b  W95 FAT32
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have done changes  concerning the etc/fstab file.

And after reboot I have still the same problem.

  hub 3-0:1.0: hub_port_status failed (err = -108)
 ....



I remember to access to windows partition easyly, is there other solution to load, at boot, windows partition without installing  ntfs-3g?

Thank you
Anything else you install to mount the windows partition is likely going to use ntfs-3g in order to mount that NTFS partition.
Ok,

So the answer to problem is solved but one unexpected
thing is that  when shutdowing the pc has still this error -108 message and pc
dos not shutdown.

Thanks