grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to install grub on fakeraid (raid 0) which spans 2 TB?


From: André Heynatz
Subject: How to install grub on fakeraid (raid 0) which spans 2 TB?
Date: Tue, 22 Dec 2009 18:02:08 +0100

I have bought two 1 TB harddisks and one 2 TB harddisk (backup).
I want to use the 1 TB harddisks in a RAID 0 array (Intel ICH8R Fakeraid).

OS: Win XP SP3, Win 7, Ubuntu Linux 9.10 32 Bit

My partition plan 1:

P ntfs  300 GB Windows XP SP3 32 Bit
P ntfs  300 GB Windows 7 32 Bit
E
L swap    2 GB Linux swap
L ext4  250 GB Ubuntu Linux 9.10 (Karmic) 32 Bit
L ntfs 1100 GB data (for data exchange and storage)
L ext4   48 GB spare space for testing of new OSes

I wanted to install Linux, then create the data partition with
Win XP SP3 Disk Management Tool. The Linux install failed
because Ubuntu wanted to install GRUB1 which is not part of
the install CD. I wonder that Ubuntu uses GRUB2 at all at the
moment because the FakeRaid support is still lacking which was
known before release (a severe regression).
However, I *managed* to install GRUB1 manually by following the
steps in:

Ubuntu FakeRaidHowto:
https://help.ubuntu.com/community/FakeRaidHowto

Ubuntu 9.10+fakeraid:
http://ubuntuforums.org/showthread.php?t=1360445

Unfortunately, the Extended Partition had no space, the Ubuntu
graphical installer just arrages so much space as required.
As I need two more partitions, I had to expand the Extended
partition somehow. I booted the Ubuntu Live System and could
extend this partition with gparted.
Then I tried to use the Win XP SP3 Disk Management Tool to create
the data partition. It destroyed the logical partitions so that
GRUB cannot boot anymore!!!
So I made another plan: First finish with NTFS partitions, then
start with Linux ones.

My partition plan 2:

P ntfs  300 GB Windows XP SP3 32 Bit
P ntfs  300 GB Windows 7 32 Bit
P ntfs 1100 GB data (for data exchange and storage)
E
L swap    2 GB Linux swap
L ext4  250 GB Ubuntu Linux 9.10 (Karmic) 32 Bit
L ext4   48 GB spare space for testing of new OSes

The last partition I do not need, but in order to include it with
the Extended partition, I added it as a Linux ext4 partition for now.

I installed Ubuntu 9.10 32 Bit with the graphical installer. As
expected, GRUB install failed. But this time GRUB1 cannot be
installed. Maybe I crossed a capacity border. I heard that 2 TB is
a limit, but I have no more (ok, 2 * 1 TB, should work).

The first part describes my experience with GRUB1. The last part is
devoted to GRUB2.

=======================================================
GRUB1 (version 0.97-29ubuntu59 from Ubuntu 9.10 32 Bit)
=======================================================

address@hidden:/# fdisk -l /dev/mapper/isw_bfacafefej_Volume0

Disk /dev/mapper/isw_bfacafefej_Volume0: 2000.4 GB, 2000404348928 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4d6d4d6c

                              Device Boot      Start         End      Blocks   
Id  System
/dev/mapper/isw_bfacafefej_Volume0p1   *           1       35695   286720056    
7  HPFS/NTFS
/dev/mapper/isw_bfacafefej_Volume0p2           35696       71391   286720000    
7  HPFS/NTFS
/dev/mapper/isw_bfacafefej_Volume0p3           71391      204958  1072876544    
7  HPFS/NTFS
/dev/mapper/isw_bfacafefej_Volume0p4          204959      243201   307186897+   
5  Extended
/dev/mapper/isw_bfacafefej_Volume0p5          204959      205230     2184808+  
82  Linux swap / Solaris
/dev/mapper/isw_bfacafefej_Volume0p6          205231      237122   256172458+  
83  Linux
/dev/mapper/isw_bfacafefej_Volume0p7          237123      243201    48829536   
83  Linux

address@hidden:~$ sudo mount --rbind /dev /target/dev
address@hidden:~$ sudo cp /etc/resolv.conf /target/etc/
address@hidden:~$ sudo chroot /target
address@hidden:/# mount
/dev/mapper/isw_bfacafefej_Volume06 on / type ext4 (rw,errors=remount-ro)
address@hidden:/# apt-get update
[...]
address@hidden:/# apt-get install grub
[...]
Unpacking grub (from .../grub_0.97-29ubuntu59_i386.deb) ...
Processing triggers for man-db ...
Setting up grub (0.97-29ubuntu59) ...

address@hidden:/# cp /usr/lib/grub/i386-pc/* /boot/grub/

Now create a device map so that GRUB knows how to access the RAID array, i.e. 
with the text editor vi.

address@hidden:/# cat /boot/grub/device.map
(fd0) /dev/fd0
(hd0) /dev/mapper/isw_bfacafefej_Volume0

I have to add --device-map, otherwise GRUB1 mentions "Unknown partition table 
signature".
GPartEd has no problems with my partition table, so I think it is correct.

address@hidden:/# grub --no-curses --device-map=/boot/grub/device.map

grub> find /boot/grub/stage1
find /boot/grub/stage1

Error 15: File not found
grub> device (hd0) /dev/mapper/isw_bfacafefej_Volume0
device (hd0) /dev/mapper/isw_bfacafefej_Volume0
grub> find /boot/grub/stage1
find /boot/grub/stage1

Error 15: File not found

grub> geometry (hd0) 
geometry (hd0)
drive 0x80: C/H/S = 243201/255/63, The number of sectors = -387927552, 
/dev/mapper/isw_bfacafefej_Volume0
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type unknown, partition type 0x7
   Partition num: 2,  Filesystem type unknown, partition type 0x7

The number of sectors seems to be wrong, it is negative.

See above for fdisk -l output which is ok.

I add the dmesg output for detection of one 1 TB hard disk. I have two HDDs of 
the
same kind, exactly. Only the serial number differs. I hope I have not passed the
2 TB maximum capacity with this RAID configuration.

[    3.656037] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.661669] ata1.00: ATA-8: SAMSUNG HD103SJ, 1AJ100E4, max UDMA/133
[    3.661673] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    3.667390] ata1.00: configured for UDMA/133
[    3.672047] ata8: SATA link down (SStatus 0 SControl 300)
[    3.672076] ata7: SATA link down (SStatus 0 SControl 300)
[    3.680155] scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HD103SJ  1AJ1 
PQ: 0 ANSI: 5
[    3.680299] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.680333] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 
TB/931 GiB)
[    3.680368] sd 0:0:0:0: [sda] Write Protect is off
[    3.680370] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.680388] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    3.680482]  sda: sda1 sda2 sda3 sda4 < >
[    3.684761] sda: p3 size 2145753088 exceeds device capacity, limited to end 
of disk
[    3.684788] sda: p4 ignored, start 3292650270 is behind the end of the disk
[    3.684980] sd 0:0:0:0: [sda] Attached SCSI disk

======================================================
GRUB2 (version 1.97+20091130 from Ubuntu 10.04 32 Bit)
======================================================

I removed package grub and deleted /boot/grub. Then I downloaded
the new GRUB2 packages from a Ubuntu 10.04 (Lucid) repository.

Further steps:

address@hidden:/# ls -1 /data/sysadmin/ubuntu/raid/grub2
grub-common_1.97+20091130-1ubuntu1_i386.deb
grub-pc_1.97+20091130-1ubuntu1_i386.deb

address@hidden:/# dpkg -EGi /data/sysadmin/ubuntu/raid/grub2/grub-*
Selecting previously deselected package grub-common.
(Reading database ... 120103 files and directories currently installed.)
Unpacking grub-common (from .../grub-common_1.97+20091130-1ubuntu1_i386.deb) ...
Selecting previously deselected package grub-pc.
Unpacking grub-pc (from .../grub-pc_1.97+20091130-1ubuntu1_i386.deb) ...
Setting up grub-common (1.97+20091130-1ubuntu1) ...

Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for sreadahead ...
Setting up grub-pc (1.97+20091130-1ubuntu1) ...

Creating config file /etc/default/grub with new version

address@hidden:/# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/mapper/isw_bfacafefej_Volume01
Found Windows 7 (loader) on /dev/mapper/isw_bfacafefej_Volume0p1
Found Ubuntu 9.10 (9.10) on /dev/mapper/isw_bfacafefej_Volume0p6
done

address@hidden:/# grub-install /dev/mapper/isw_bfacafefej_Volume0
Installation finished. No error reported.

Reboot.

GRUB loading.
error: no such disk
grub rescue>

Even after correcting /boot/grub/device.map to the dmraid configuration
(see GRUB1 section), I still cannot boot and get the
error message above. 

Here is my /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
  set have_grubenv=true
  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
fi
insmod ext2
set root=(/dev/mapper/isw_bfacafefej_Volume06)
search --no-floppy --fs-uuid --set 9f8c8d2f-0f67-454c-aec0-affd8fa02fe9
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
set locale_dir=/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/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, with Linux 2.6.31-14-generic" {
        set recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(/dev/mapper/isw_bfacafefej_Volume06)
        search --no-floppy --fs-uuid --set 9f8c8d2f-0f67-454c-aec0-affd8fa02fe9
        linux   /boot/vmlinuz-2.6.31-14-generic 
root=UUID=9f8c8d2f-0f67-454c-aec0-affd8fa02fe9 ro   quiet splash
        initrd  /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, with Linux 2.6.31-14-generic (recovery mode)" {
        set recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        insmod ext2
        set root=(/dev/mapper/isw_bfacafefej_Volume06)
        search --no-floppy --fs-uuid --set 9f8c8d2f-0f67-454c-aec0-affd8fa02fe9
        linux   /boot/vmlinuz-2.6.31-14-generic 
root=UUID=9f8c8d2f-0f67-454c-aec0-affd8fa02fe9 ro single 
        initrd  /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/mapper/isw_bfacafefej_Volume01)" {
        insmod ntfs
        set root=(/dev/mapper/isw_bfacafefej_Volume01)
        search --no-floppy --fs-uuid --set 022834062833f6ef
        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 ###

=======================================================================

What can I do now?

Andre

-- 
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02




reply via email to

[Prev in Thread] Current Thread [Next in Thread]