help-grub
[Top][All Lists]
Advanced

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

Debian squeeze on raid 0 and install grub2


From: Damien Moity
Subject: Debian squeeze on raid 0 and install grub2
Date: Wed, 2 Jul 2014 08:25:06 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hello,

I wrote a script that allows me to install the distribution "debian squeeze" on a RAID 0 but the script crashes when installing grub :
-------
grub-install --modules="raid mdraid part_gpt ext2" /dev/md0
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk. This is a BAD idea.. /usr/sbin/grub-setup: error: embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
-------

Grub version :
-------
update-grub -v
grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1

grub-install -v
grub-install (GRUB) 1.98+20100804-14+squeeze1
-------

First I boot on a "System Rescue CD" and I create 'logical raid0' with 'mdadm' :
-------
mdadm -D /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Tue Jul  1 14:07:21 2014
     Raid Level : raid0
     Array Size : 52427776 (50.00 GiB 53.69 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Tue Jul  1 14:07:21 2014
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 512K

           Name : sysresccd:0  (local to host sysresccd)
           UUID : 972ee921:bc2ecdb5:0c9b9350:14cbf787
         Events : 0

    Number   Major   Minor   RaidDevice State
       0       8        0        0      active sync   /dev/sda
       1       8       16        1      active sync   /dev/sdb
-------

I create raid0 partitions with 'gdisk' :
-------
address@hidden /root % gdisk -l /dev/md0
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/md0: 104855552 sectors, 50.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 45EC12F7-47B7-4339-A219-199F35A51B5F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 104855518
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
1 2048 18431 8.0 MiB EF02 BIOS boot partition
   2           18432        41961471   20.0 GiB    EF00  Linux filesystem
   3        41961472        44058623   1024.0 MiB  8200  Linux swap
   4        44058624       104855518   29.0 GiB    8300  Linux filesystem
-------

I make filesystem on created partitions :
* part1 (md0p1) with mkfs.ext3 => bios_grub
* part2 (md0p2) with mkfs.ext3 => /
* part3 (md0p3) with mkswap => swap
* part4 (md0p4) with mkswap => /srv

I install debian distribution on md0p2 :
* partimage -B=foo -b restore /dev/md0p2 my_image_debian
* e2fsck -f -y /dev/md0p2
* resize2fs -f /dev/md0p2

I mount ressources :
-------
mount -l | grep md0
/dev/md0p2 on /mnt/gentoo type ext3 (rw)
/dev/md0p4 on /mnt/gentoo/srv type ext3 (rw)
-------

I init fstab and mtab with the new partitions.

And now i want to install grub. I write disk on /mnt/gentoo/boot/grub/device.map :
-------
cat /mnt/gentoo/boot/grub/device.map
(md0)   /dev/disk/by-id/md-uuid-972ee921:bc2ecdb5:0c9b9350:14cbf787
(md0p2) /dev/disk/by-id/md-uuid-972ee921:bc2ecdb5:0c9b9350:14cbf787-part2
(hd0)   /dev/disk/by-id/ata-VBOX_HARDDISK_VB4b33f8ee-87039d31
(hd1)   /dev/disk/by-id/ata-VBOX_HARDDISK_VBc34d645e-16ef1e20
-------

I update grub with : chroot /mnt/gentoo /bin/bash update-grub and and after installation of grub crashes.

Do you have any ideas on what could be wrong ? I read many forums but I have not found a solution.

Thanks for your help.

Damien.



reply via email to

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