help-grub
[Top][All Lists]
Advanced

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

Re: booting from a raid1


From: lee
Subject: Re: booting from a raid1
Date: Sun, 3 Oct 2010 15:34:39 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Oct 03, 2010 at 07:34:15AM -0400, Tom H wrote:
> On Fri, Oct 1, 2010 at 10:30 AM, lee <address@hidden> wrote:
> > On Fri, Oct 01, 2010 at 03:49:28PM +0200, lee wrote:
> >> On Fri, Oct 01, 2010 at 09:25:19AM -0400, Tom H wrote:
> >> > On Fri, Oct 1, 2010 at 8:50 AM, lee <address@hidden> wrote:
> >> > > On Fri, Oct 01, 2010 at 12:22:28PM +0200, Emil Micek wrote:
> >> > >> On Fri, 1 Oct 2010, lee wrote:
> >
> >> > >> As far as i know grub2 can't boot from raid arrays with version 1.2
> >> > >> metadata superblock. At least your /boot partition must reside on
> >> > >> RAID with version 0.9 superblock.
> >> > >
> >> >  grub2  (1.98+20100720-1) unstable; urgency=low
> >>
> >> There seems to be version 1.98+20100 in testing, so it should work:
> >>
> >> yun:~# apt-cache show grub2
> >> Version: 1.98+20100804-4
> >>
> >> need to/can I somehow use chroot to switch to the new root partition
> >> and then use grub-install or grub-mkconfig from there so that it will
> >> create the grub.cfg as needed?
> >
> > Ok, I tried with chroot, but grub-install doesn't create a grub.cfg at
> > all. It only warns about improperly nested partitions and an unknown
> > filesystem as before but says the installation finished with no
> > errors.
> >
> > When running grub-mkconfig, I'm getting the following output (letting
> > aside the warnings and the error message about the unknown filesystem):
> >
> > ### 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 load_video {
> >  insmod vbe
> >  insmod vga
> >  insmod video_bochs
> >  insmod video_cirrus
> > }
> >
> > insmod raid
> > insmod mdraid
> > insmod part_msdos
> > insmod part_msdos
> >
> > ... and that's all. The last line when grub-mkconfig prints to stdout is:
> >
> > /usr/sbin/grub-probe: error: unknown filesystem.
> >
> >
> > All the partitions use ext4. Doesn't grub know about ext4?
> 
> What filesystems did you mount before chrooting?

yun:/mnt# mount
/dev/sde1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/md0p7 on /tmp type ext4 (rw,errors=remount-ro)
/dev/md0p3 on /usr type ext4 (rw)
/dev/md0p5 on /var type ext4 (rw,errors=remount-ro)
/dev/md126 on /home type ext4 (rw,errors=remount-ro)
/dev/md0p6 on /opt type ext4 (ro)
/dev/md0p2 on /mnt/raid type ext4 (rw)
/usr on /mnt/raid/usr type none (rw,bind)
/var on /mnt/raid/var type none (rw,bind)
/tmp on /mnt/raid/tmp type none (rw,bind)
/dev on /mnt/raid/dev type none (rw,bind)
/dev/shm on /mnt/raid/dev/shm type none (rw,bind)
/proc on /mnt/raid/proc type none (rw,bind)
/sys on /mnt/raid/sys type none (rw,bind)
/mnt/tst on /mnt/raid/mnt/tst type none (rw,bind)
yun:/mnt# fdisk -lu

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x52f0b1be

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907029167  1953513560   da  Non-FS data

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x209529d4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907029167  1953513560   da  Non-FS data

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e00f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048   976773167   488385560   da  Non-FS data

Disk /dev/sde: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390719855 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf7f1999d

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *          63     1959929      979933+  83  Linux
/dev/sde2         1959930    64452779    31246425   82  Linux swap / Solaris
/dev/sde3        64452780   189454544    62500882+  83  Linux
/dev/sde4       189454606   390716864   100631129+   5  Extended
/dev/sde5       189454608   314456309    62500851   83  Linux
/dev/sde6       314456373   390716864    38130246   83  Linux

Disk /dev/sdf: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00006bbb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1            2048   976773167   488385560   da  Non-FS data

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x585ee666

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  3907029167  1953513560   da  Non-FS data

Disk /dev/md0: 500.1 GB, 500105625600 bytes
2 heads, 4 sectors/track, 122096100 cylinders, total 976768800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x485cd85b

    Device Boot      Start         End      Blocks   Id  System
/dev/md0p1            2048   134219775    67108864   82  Linux swap / Solaris
/dev/md0p2   *   134219776   144705535     5242880   83  Linux
/dev/md0p3       144705536   354420735   104857600   83  Linux
/dev/md0p4       354420736   976768799   311174032    5  Extended
/dev/md0p5       354422784   564137983   104857600   83  Linux
/dev/md0p6       564140032   773855231   104857600   83  Linux
/dev/md0p7       773857280   976768799   101455760   83  Linux

Disk /dev/md126: 4000.8 GB, 4000792444928 bytes
2 heads, 4 sectors/track, 976755968 cylinders, total 7814047744
sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Disk /dev/md126 doesn't contain a valid partition table
yun:/mnt# cat /proc/mdstat 
Personalities : [raid1] [raid6] [raid5] [raid4] 
md126 : active raid5 sdc1[0] sda1[3] sdb1[1]
      3907023872 blocks super 1.2 level 5, 512k chunk, algorithm 2
      [3/3] [UUU]
      
md0 : active raid1 sdd1[0] sdf1[1]
      488384400 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>
yun:/mnt# 


It's supposed to become a very simple setup with two RAID arrays,
i. e. a RAID1 for the system partitions and a RAID5 for /home. Once I
get more SATA cables, I can connect another 300GB SATA disk and the
DVD drives. I want to retire the IDE disk (/dev/sde).

If I have to, I can make a small partition on the other SATA disk
(which isn't connected yet and which I don't really need atm) to use
for /boot, but that disk is likely to be the next one to fail.



reply via email to

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