LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2011, 05:11 AM   #1
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Rep: Reputation: 0
loader issue


hello,

so I've finished installing ubuntu. I had xp for a while and have installed seven yesterday.
There is a problem with the loader because it automatically logs in with seven.
I'd like to change the loader so that I can choose between xp, seven and ubuntu when it starts.
This is really messy. I have 3 hard drives, and it seems that each one holds a piece of something. I would want only one disk to contain all that is related to the systems, the other 2 are only for data and likely to be removed. From what I saw during the installation process, I have a disk sda that contains data, and maybe grub, a disk sdb that contains the 3 OSes, and a disk sdc that may contain the seven loader. I don't know whether the seven installation, which I did only yesterday, triggered the creation of a windows loader to choose between xp and seven, but I wasn't asked this during the boot.

Please help me to clean this situation so that everything works and is properly lined up.

Thanks
 
Old 03-13-2011, 07:15 AM   #2
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
I used Boot Info Script 0.55 dated February 15th, 2010 to display some more information that you might need. Here is the output:

============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #6 for /boot/grub.
=> Windows is installed in the MBR of /dev/sdc
=> Windows is installed in the MBR of /dev/sdd

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sdb1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

sdb2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /ntldr /NTDETECT.COM

sdb3: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sdb5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sdb6: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04.2 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb7: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sdc1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /Boot/BCD

sdd1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 63 3,907,024,064 3,907,024,002 7 HPFS/NTFS


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 2,048 286,722,047 286,720,000 7 HPFS/NTFS
/dev/sdb2 * 344,805,439 488,394,751 143,589,313 7 HPFS/NTFS
/dev/sdb3 286,724,094 344,805,375 58,081,282 5 Extended
/dev/sdb5 286,724,096 288,675,839 1,951,744 82 Linux swap / Solaris
/dev/sdb6 288,677,888 300,394,495 11,716,608 83 Linux
/dev/sdb7 300,396,544 344,805,375 44,408,832 83 Linux


Drive: sdc ___________________ __________________________________________________ ___

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdc1 * 63 3,907,024,064 3,907,024,002 7 HPFS/NTFS


Drive: sdd ___________________ __________________________________________________ ___

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdd1 63 976,768,064 976,768,002 7 HPFS/NTFS


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 5C38FB8B38FB6286 ntfs WD
/dev/sda: PTTYPE="dos"
/dev/sdb1 60E8B570E8B544D6 ntfs
/dev/sdb2 384CD74B4CD70314 ntfs System
/dev/sdb3: PTTYPE="dos"
/dev/sdb5 7685b1a8-59ea-4c0a-99b2-d75d54fe99ff swap
/dev/sdb6 e339f209-bb4b-4e57-876a-b2b0d17e2e0b ext4
/dev/sdb7 069330ae-88c3-41d3-a102-8293f131928f ext4
/dev/sdb: PTTYPE="dos"
/dev/sdc1 9E34497534495207 ntfs Samsung
/dev/sdc: PTTYPE="dos"
/dev/sdd1 04F02993F0298BCC ntfs Seagate
/dev/sdd: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=========================== sdb6/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=e339f209-bb4b-4e57-876a-b2b0d17e2e0b ro quiet splash
initrd /boot/initrd.img-2.6.32-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
echo 'Loading Linux 2.6.32-28-generic ...'
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=e339f209-bb4b-4e57-876a-b2b0d17e2e0b ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-28-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sdb2)" {
insmod ntfs
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 384cd74b4cd70314
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sdc1)" {
insmod ntfs
set root='(hd2,1)'
search --no-floppy --fs-uuid --set 9e34497534495207
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

=============================== sdb6/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdb6 during installation
UUID=e339f209-bb4b-4e57-876a-b2b0d17e2e0b / ext4 errors=remount-ro 0 1
# /home was on /dev/sdb7 during installation
UUID=069330ae-88c3-41d3-a102-8293f131928f /home ext4 defaults 0 2
# swap was on /dev/sdb5 during installation
UUID=7685b1a8-59ea-4c0a-99b2-d75d54fe99ff none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

=================== sdb6: Location of files loaded by Grub: ===================


149.0GB: boot/grub/core.img
149.0GB: boot/grub/grub.cfg
149.2GB: boot/initrd.img-2.6.32-28-generic
149.1GB: boot/vmlinuz-2.6.32-28-generic
149.2GB: initrd.img
149.1GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sdb3

00000000 58 7e 27 54 b3 b6 3f 10 52 98 46 4d f7 b0 46 fd |X~'T..?.R.FM..F.|
00000010 ad 02 91 21 e4 7e be 57 c9 a4 0a 3a 32 a6 45 ea |...!.~.W...:2.E.|
00000020 10 10 94 a7 69 fc d2 bf ff ff bb f9 f9 64 54 03 |....i........dT.|
00000030 98 61 60 d8 f1 ab 85 95 86 96 78 02 3c 61 c1 4d |.a`.......x.<a.M|
00000040 eb 1c 65 82 a5 07 06 93 99 76 d6 b4 24 30 28 79 |..e......v..$0(y|
00000050 41 9a 24 c3 43 24 0d 31 e4 12 68 34 a4 66 f0 14 |A.$.C$.1..h4.f..|
00000060 88 10 b6 b0 af dd d8 2d 7d 03 96 ef bc 6f dc a5 |.......-}....o..|
00000070 6d 15 b2 89 a4 28 b2 38 88 39 2c 79 2f 2c 46 c2 |m....(.8.9,y/,F.|
00000080 0e 26 2f bc 05 08 5a 42 5a 96 dd 79 e2 69 6c d0 |.&/...ZBZ..y.il.|
00000090 a1 8a ef da e9 58 f4 91 4b 4e 85 ab 94 12 41 74 |.....X..KN....At|
000000a0 4c c5 ac 1e 88 e7 8b 4e 09 44 ba 19 b0 9d b6 93 |L......N.D......|
000000b0 b4 3c 40 c3 71 34 ca 85 d3 09 b2 db 1e d6 a6 64 |.<@.q4.........d|
000000c0 97 e3 3f 53 42 d7 b9 d1 0f b1 7a f7 d7 0d fd 7b |..?SB.....z....{|
000000d0 6e 1d 20 ac 67 a0 14 3a 73 7a 17 92 5a 16 e1 59 |n. .g..:sz..Z..Y|
000000e0 0b f0 f2 1f ba 7b 9c ed ad 14 54 85 09 7b 38 b6 |.....{....T..{8.|
000000f0 0f 3e 83 dd 82 ab f9 ba d9 ae bb f8 cb dd 95 7f |.>..............|
00000100 21 bd 39 e0 71 49 6d cc a5 46 50 21 2a fd 50 03 |!.9.qIm..FP!*.P.|
00000110 c4 0f 42 04 6c 20 48 44 5c 6d 4a 5a 13 f1 6c 86 |..B.l HD\mJZ..l.|
00000120 14 92 8e 3b a7 8d 6e 67 3e e8 3e 8c 19 3c c0 58 |...;..ng>.>..<.X|
00000130 30 63 1b 03 e1 f5 5c a5 cf 5f f3 7f ba 7f 8f 98 |0c....\.._......|
00000140 99 74 ff ff ff 6d a6 1b 24 72 ba 00 cc fe 95 38 |.t...m..$r.....8|
00000150 cd 24 44 38 f0 88 80 2e 1a 58 15 43 22 cf 00 42 |.$D8.....X.C"..B|
00000160 80 80 86 49 30 0a 08 40 f4 d1 6b 65 94 1e 2d 44 |...I0..@..ke..-D|
00000170 e1 a0 38 14 46 1a 08 40 05 3f bc 79 ff fb b0 64 |..8.F..@.?.y...d|
00000180 18 8e 07 37 65 53 8b 78 65 50 3f e9 5b ef 30 02 |...7eS.xeP?.[.0.|
00000190 e5 1c 25 85 50 4d e1 33 80 ee a5 70 34 b0 0b 95 |..%.PM.3...p4...|
000001a0 ae e6 02 58 2c 2d 2a fa 76 d5 85 9e 83 84 ec 47 |...X,-*.v......G|
000001b0 dd 98 2d 43 85 f8 e4 c3 e0 53 ad 54 01 14 00 fe |..-C.....S.T....|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 c8 1d 00 00 fe |................|
000001d0 ff ff 05 fe ff ff 02 c8 1d 00 00 d0 b2 00 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
 
Old 03-13-2011, 09:24 AM   #3
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Can I get some help on this please ?
I would really like to be able to boot on xp.
Thanks
 
Old 03-13-2011, 10:02 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
It's a mess.

Easiest might just be to install grub to the MBR of /dev/sda.

You'll need to boot from the live CD to do this.

Here is how to reinstall grub

When you run update-grub your windows partitions will be detected and added to the list of boot options.
 
Old 03-13-2011, 10:13 AM   #5
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Yeah I know it's a mess, there's a piece of something everywhere .
That's why I need your help, I'm totally lost.

I am running the live CD right now.

From the page you gave, I see that the first step is sudo fdisk -l, which gives:

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x542c4020

Device Boot Start End Blocks Id System
/dev/sda1 1 243201 1953512001 7 HPFS/NTFS

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa273a273

Device Boot Start End Blocks Id System
/dev/sdb1 1 17848 143360000 7 HPFS/NTFS
/dev/sdb2 * 21464 30402 71794656+ 7 HPFS/NTFS
/dev/sdb3 17848 21464 29040641 5 Extended
/dev/sdb5 17848 17970 975872 82 Linux swap / Solaris
/dev/sdb6 17970 18699 5858304 83 Linux
/dev/sdb7 18699 21464 22204416 83 Linux

Partition table entries are not in disk order

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x542c401f

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 243201 1953512001 7 HPFS/NTFS

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8fe34af8

Device Boot Start End Blocks Id System
/dev/sdd1 1 60801 488384001 7 HPFS/NTFS


What should I do next ?
 
Old 03-13-2011, 10:20 AM   #6
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
I tried sudo mount /dev/sdb6 /mnt since I think sda6 is where / is installed.
Then sudo grub-install --root-directory=/mnt/ /dev/sdb6
The result is:
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged..
/usr/sbin/grub-setup: error: if you really want blocklists, use --force.
 
Old 03-13-2011, 10:24 AM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Then sudo grub-install --root-directory=/mnt/ /dev/sdb6
It needs to be sudo grub-install --root-directory=/mnt/ /dev/sdb
because you are installing to the MBR
 
Old 03-13-2011, 10:33 AM   #8
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Right, sorry I'm so dumb.
So I did just that, a line was written saying that it completed successfully.
Then I rebooted the computer, as requested.
It is still booting on 7.
 
Old 03-13-2011, 10:50 AM   #9
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Is grub booting you to win7?
Do you see the grub menu?
Maybe you have to hold down SHIFT when you are booting, to see the menu if it is hidden.
 
Old 03-13-2011, 10:52 AM   #10
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
No, what I meant is that grub doesn't appear. It directly loads 7, as if neither ubuntu nor xp were installed.
According to the boot info script of post 3, it would appear that the computer is booting on sdc rather than sdb.
Can I remove (is it dangerous?) the loader of 7 from sdc so that grub is used (it is in sdb) ?
 
Old 03-13-2011, 10:59 AM   #11
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
The "Loader" is what re-installs win7 I think. I gave up win at '98, so I don't really know.

Maybe try installing grub to /dev/sdc if that is the drive your PC is booting from. Can't do any harm (?)

First please check if there's anything in your BIOS (Eg boot device order) which lists /dev/sdc first, which might be why grub isn't being loaded.

Edit:
Maybe you could post the output of bootinfo again, to make sure grub really did install to /dev/sda

Last edited by tredegar; 03-13-2011 at 11:28 AM.
 
Old 03-13-2011, 11:38 AM   #12
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
I switched the sata cables of sdb and sdc, and now finally grub launched. The switch I made was at the disk extremities. I think this fact is relevant: the name of the devices (sda,b,c...) depends to the way they're connected to the motherboard, right ? So my switch didn't affect the names, I think.
I am still not satisfied though, because I still think it's quite a mess.
First of all, I find it quite weird that the loader of 7 is in sdc, whereas all the OSes are on sdb. How can I change that ?
Secondly, I would like to change the names so that sda is where the OSes are, it seems more logical to me. I think the first question of this post will help me to achieve that.
Thirdly, I was wondering whether the installation of 7 triggered an installation of a multiboot windows software (something that would allow me to switch between xp and 7). If there is one, I'd like to remove it because grub can do this task.
If you see other things that are messed up, please communicate them to me.
I am at the grub prompt and awaiting for your instructions.

Last edited by Bob32; 03-13-2011 at 11:40 AM.
 
Old 03-13-2011, 11:53 AM   #13
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Doesn't my situation have anything to do with the boot flags ? I can see that xp (sdb2 in the text above, now sdc2 after the switch) is the only one who has a boot flag set...
 
Old 03-13-2011, 12:19 PM   #14
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
I have made some more wire switches. The devices are now named the way I want (in particular, sda is the device where the OSes are.
I think I'm done moving the wires around, now I just need to configure the computer to make it work the way it is.
As it is, windows 7 launches automatically, (windows7 is in sda1, but its loader is in sdc1...). grub doesn't launch (it is in the sda mbr).

So what I would like to do is to make my computer launch grub when it boots.
Then, I'd like to clean it all to make it less of a mess. In particular, if it is possible, I'd like to remove the windows 7 launcher that is in sdc1 and has nothing to do there (it's just a data drive).
Here it the boot info script output:






Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #6 for /boot/grub.
=> Windows is installed in the MBR of /dev/sdb
=> Windows is installed in the MBR of /dev/sdc
=> Windows is installed in the MBR of /dev/sdd

sda1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

sda2: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /ntldr /NTDETECT.COM

sda3: _________________________________________________________________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sda5: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

sda6: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04.2 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda7: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

sdb1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sdc1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /Boot/BCD

sdd1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 286,722,047 286,720,000 7 HPFS/NTFS
/dev/sda2 * 344,805,439 488,394,751 143,589,313 7 HPFS/NTFS
/dev/sda3 286,724,094 344,805,375 58,081,282 5 Extended
/dev/sda5 286,724,096 288,675,839 1,951,744 82 Linux swap / Solaris
/dev/sda6 288,677,888 300,394,495 11,716,608 83 Linux
/dev/sda7 300,396,544 344,805,375 44,408,832 83 Linux


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 63 976,768,064 976,768,002 7 HPFS/NTFS


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdc1 * 63 3,907,024,064 3,907,024,002 7 HPFS/NTFS


Drive: sdd ___________________ _____________________________________________________

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdd1 63 3,907,024,064 3,907,024,002 7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 60E8B570E8B544D6 ntfs
/dev/sda2 384CD74B4CD70314 ntfs System
/dev/sda3: PTTYPE="dos"
/dev/sda5 7685b1a8-59ea-4c0a-99b2-d75d54fe99ff swap
/dev/sda6 e339f209-bb4b-4e57-876a-b2b0d17e2e0b ext4
/dev/sda7 069330ae-88c3-41d3-a102-8293f131928f ext4
/dev/sda: PTTYPE="dos"
/dev/sdb1 04F02993F0298BCC ntfs Seagate
/dev/sdb: PTTYPE="dos"
/dev/sdc1 9E34497534495207 ntfs Samsung
/dev/sdc: PTTYPE="dos"
/dev/sdd1 5C38FB8B38FB6286 ntfs WD
/dev/sdd: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=========================== sda6/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=e339f209-bb4b-4e57-876a-b2b0d17e2e0b ro quiet splash
initrd /boot/initrd.img-2.6.32-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
echo 'Loading Linux 2.6.32-28-generic ...'
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=e339f209-bb4b-4e57-876a-b2b0d17e2e0b ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-28-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd1,6)'
search --no-floppy --fs-uuid --set e339f209-bb4b-4e57-876a-b2b0d17e2e0b
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sdb2)" {
insmod ntfs
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 384cd74b4cd70314
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sdc1)" {
insmod ntfs
set root='(hd2,1)'
search --no-floppy --fs-uuid --set 9e34497534495207
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

=============================== sda6/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdb6 during installation
UUID=e339f209-bb4b-4e57-876a-b2b0d17e2e0b / ext4 errors=remount-ro 0 1
# /home was on /dev/sdb7 during installation
UUID=069330ae-88c3-41d3-a102-8293f131928f /home ext4 defaults 0 2
# swap was on /dev/sdb5 during installation
UUID=7685b1a8-59ea-4c0a-99b2-d75d54fe99ff none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

=================== sda6: Location of files loaded by Grub: ===================


149.0GB: boot/grub/core.img
149.0GB: boot/grub/grub.cfg
149.2GB: boot/initrd.img-2.6.32-28-generic
149.1GB: boot/vmlinuz-2.6.32-28-generic
149.2GB: initrd.img
149.1GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda3

00000000 58 7e 27 54 b3 b6 3f 10 52 98 46 4d f7 b0 46 fd |X~'T..?.R.FM..F.|
00000010 ad 02 91 21 e4 7e be 57 c9 a4 0a 3a 32 a6 45 ea |...!.~.W...:2.E.|
00000020 10 10 94 a7 69 fc d2 bf ff ff bb f9 f9 64 54 03 |....i........dT.|
00000030 98 61 60 d8 f1 ab 85 95 86 96 78 02 3c 61 c1 4d |.a`.......x.<a.M|
00000040 eb 1c 65 82 a5 07 06 93 99 76 d6 b4 24 30 28 79 |..e......v..$0(y|
00000050 41 9a 24 c3 43 24 0d 31 e4 12 68 34 a4 66 f0 14 |A.$.C$.1..h4.f..|
00000060 88 10 b6 b0 af dd d8 2d 7d 03 96 ef bc 6f dc a5 |.......-}....o..|
00000070 6d 15 b2 89 a4 28 b2 38 88 39 2c 79 2f 2c 46 c2 |m....(.8.9,y/,F.|
00000080 0e 26 2f bc 05 08 5a 42 5a 96 dd 79 e2 69 6c d0 |.&/...ZBZ..y.il.|
00000090 a1 8a ef da e9 58 f4 91 4b 4e 85 ab 94 12 41 74 |.....X..KN....At|
000000a0 4c c5 ac 1e 88 e7 8b 4e 09 44 ba 19 b0 9d b6 93 |L......N.D......|
000000b0 b4 3c 40 c3 71 34 ca 85 d3 09 b2 db 1e d6 a6 64 |.<@.q4.........d|
000000c0 97 e3 3f 53 42 d7 b9 d1 0f b1 7a f7 d7 0d fd 7b |..?SB.....z....{|
000000d0 6e 1d 20 ac 67 a0 14 3a 73 7a 17 92 5a 16 e1 59 |n. .g..:sz..Z..Y|
000000e0 0b f0 f2 1f ba 7b 9c ed ad 14 54 85 09 7b 38 b6 |.....{....T..{8.|
000000f0 0f 3e 83 dd 82 ab f9 ba d9 ae bb f8 cb dd 95 7f |.>..............|
00000100 21 bd 39 e0 71 49 6d cc a5 46 50 21 2a fd 50 03 |!.9.qIm..FP!*.P.|
00000110 c4 0f 42 04 6c 20 48 44 5c 6d 4a 5a 13 f1 6c 86 |..B.l HD\mJZ..l.|
00000120 14 92 8e 3b a7 8d 6e 67 3e e8 3e 8c 19 3c c0 58 |...;..ng>.>..<.X|
00000130 30 63 1b 03 e1 f5 5c a5 cf 5f f3 7f ba 7f 8f 98 |0c....\.._......|
00000140 99 74 ff ff ff 6d a6 1b 24 72 ba 00 cc fe 95 38 |.t...m..$r.....8|
00000150 cd 24 44 38 f0 88 80 2e 1a 58 15 43 22 cf 00 42 |.$D8.....X.C"..B|
00000160 80 80 86 49 30 0a 08 40 f4 d1 6b 65 94 1e 2d 44 |...I0..@..ke..-D|
00000170 e1 a0 38 14 46 1a 08 40 05 3f bc 79 ff fb b0 64 |..8.F..@.?.y...d|
00000180 18 8e 07 37 65 53 8b 78 65 50 3f e9 5b ef 30 02 |...7eS.xeP?.[.0.|
00000190 e5 1c 25 85 50 4d e1 33 80 ee a5 70 34 b0 0b 95 |..%.PM.3...p4...|
000001a0 ae e6 02 58 2c 2d 2a fa 76 d5 85 9e 83 84 ec 47 |...X,-*.v......G|
000001b0 dd 98 2d 43 85 f8 e4 c3 e0 53 ad 54 01 14 00 fe |..-C.....S.T....|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 c8 1d 00 00 fe |................|
000001d0 ff ff 05 fe ff ff 02 c8 1d 00 00 d0 b2 00 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
 
Old 03-13-2011, 12:31 PM   #15
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
the name of the devices (sda,b,c...) depends to the way they're connected to the motherboard, right
They are labelled in the order they are detected by the kernel. This usually depends on how they are connected to the disk controller.

Ubuntu mounts disks by UUID, so moving them around doesn't matter.
I don't know anything about windows.

Quote:
First of all, I find it quite weird that the loader of 7 is in sdc, whereas all the OSes are on sdb. How can I change that ?
I do not know.

Quote:
Secondly, I would like to change the names so that sda is where the OSes are, it seems more logical to me. I think the first question of this post will help me to achieve that.
Moving windows may cause windows to have a problem.

Quote:
Thirdly, I was wondering whether the installation of 7 triggered an installation of a multiboot windows software (something that would allow me to switch between xp and 7).
I am not aware of any MS "Multiboot" software, but I know nothing about windows.

You are at the grub prompt? No menu?
This is probably because grub can't find the kernel because it is looking in the wrong place, because you have moved your disks around, and I can't tell you what to do as I don't know what is where.

This may help you:
http://140.120.7.20/LinuxRef/Booting...0Rescue%20Mode

Quote:
Doesn't my situation have anything to do with the boot flags ? I can see that xp (sdb2 in the text above, now sdc2 after the switch) is the only one who has a boot flag set..
No, grub ignores the boot flag.

Quote:
I have made some more wire switches....
You are posting faster than I can answer.

But it looks like grub is indeed on /dev/sda which is good.

But sda6/boot/grub/grub.cfg is looking for the kernel on sdb6 when it is now on sda6 so that's why it isn't working.

Back to the live distro and follow the instructions in my link at #4
Remember root is now /dev/sda6 not /dev/sdb6
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Valgrind / loader / $ORIGIN issue jim2718 Linux - Software 1 12-17-2010 06:15 PM
reformat/boot loader issue babag Mandriva 2 06-16-2007 03:35 AM
boot loader issue tm2383 Fedora 1 11-02-2006 12:46 PM
Ahh help! (Grub Boot Loader Issue). RoaCh Of DisCor Linux - Software 9 09-09-2004 05:39 AM
grub boot loader issue mbegovic Linux - Software 2 04-17-2004 05:59 PM


All times are GMT -5. The time now is 10:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration