LinuxQuestions.org
Review your favorite Linux distribution.
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 09-05-2012, 12:45 PM   #1
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Rep: Reputation: Disabled
Debian - Software Raid 1 and Grub issue


Hi there. Long time reader first time poster...

I have done basic installs of Fedora, Ubuntu, Linux Mint, and CentOS... But I am attempting something new. I am attempting to install Debian using the Software RAID (Raid 1). I have 2, 3 TB drives. I get through the initial setup of the , Hostname, Fully quilified domain name, root password, new user/password setup, and I get to the partioning and software raid configuration. I select manual set and create the paritions and software raid and assign EXT 4 and Swap. But when it gets to "Install the GRUB boot loader" part I get the following:

Quote:
Unable to install GRUB in /dev/sda
Executing 'grub-install /dev/sda' failed.

This is a fatal error.
I think I am messing up with the Prattioning and Software RAID setup. I create four prations on each drive.
Disk 1
1 GB - Physical volume for RAID
8.5 GB - Physical volume for RAID
50 GB - Physical volume for RAID
2.9 TB - Physical volume for RAID

Disk 2
1 GB - Physical volume for RAID
8.5 GB - Physical volume for RAID
50 GB - Physical volume for RAID
2.9 TB - Physical volume for RAID

I then create the following software Raid 1

1 GB - ext4 -/boot
8.5 GB - swap
50 GB - ext4 - /
2.9 TB ext4 - /home

With this setup I am getting the above error when GRUB is trying to install.
I read some where that the MBR doesn't like anything about 2 TB so I even made the /home just 2 TB just to see what may happen but I still get the same result.

Thanks for any help that you may be able to provide.
 
Old 09-06-2012, 10:19 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 598

Rep: Reputation: 120Reputation: 120
For GRUB2 to work with RAID1, you must leave a 1MiB space between the MBR and the start of the first partition. This space is used for the core.img file. So, if your sector size is 512B, your first partition must start on sector 2048. This goes for both sda and sdb.

If the installation allows it, you must select both sda and sdb for the installation of GRUB2. It does not automatically install itself on both drives. If the installation does not allow it, then install GRUB2 on sda and after the installation of Squeeze is completed and you reboot, install GRUB2 on sdb:
Code:
grub-install /dev/sdb
Hope this helps.
 
Old 09-09-2012, 03:39 PM   #3
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
Question...

When doing the inital partitioning at the begining it is automaticly giving 1mb free the very front of the "1 GB - Physical volume for RAID" that I make. So am I neededing to create partitions like the following:

1mb - set to ???
1 GB - Physical volume for RAID
8.5 GB - Physical volume for RAID
50 GB - Physical volume for RAID
2.9 TB - Physical volume for RAID (aka. remaining space)

So it looks like: sda
1mb
1mb - set to ???
1 GB - Physical volume for RAID
8.5 GB - Physical volume for RAID
50 GB - Physical volume for RAID
2.9 TB - Physical volume for RAID (aka. remaining space)

Then do the same thing for sdb?
 
Old 09-09-2012, 07:26 PM   #4
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 598

Rep: Reputation: 120Reputation: 120
Boot from the LiveCD and paste the output of:
Code:
fdisk -l /dev/sda /dev/sdb
 
Old 09-09-2012, 08:07 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,520

Rep: Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106
Quote:
Originally Posted by raksasas View Post
I think I am messing up with the Prattioning and Software RAID setup. I create four prations on each drive.
Disk 1
1 GB - Physical volume for RAID
8.5 GB - Physical volume for RAID
50 GB - Physical volume for RAID
2.9 TB - Physical volume for RAID

Disk 2
1 GB - Physical volume for RAID
8.5 GB - Physical volume for RAID
50 GB - Physical volume for RAID
2.9 TB - Physical volume for RAID

I then create the following software Raid 1

1 GB - ext4 -/boot
8.5 GB - swap
50 GB - ext4 - /
2.9 TB ext4 - /home
So are you creating 4 RAID 1 arrays?

Personally, I make it a point to not install the OS on a RAID, at least not the same one that the rest of the partitions live on. The reason to split /home onto its own partition is to allow you to change the OS without affecting the contents of /home. However, if /home lives on the same RAID as /, that means that in order for you to use /home after the new OS install, you absolutely must set up the exact same RAID during the install of the new OS as you had before (IE: you must recover the existing RAID during the installation of the new OS). This is finicky to say the least, which is why I avoid it whenever possible.

Last edited by suicidaleggroll; 09-09-2012 at 08:10 PM.
 
Old 09-10-2012, 09:57 AM   #6
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
Here you go, towheedm.
Quote:
user@debian:~$ sudo fdisk -l /dev/sda /dev/sdb

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 267350 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
 
Old 09-10-2012, 09:25 PM   #7
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 598

Rep: Reputation: 120Reputation: 120
Quote:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
As it says, you must use parted if you use GPT. Boot from the LiveCD and install it:
Code:
sudo apt-get install parted
And print the partition table:
Code:
sudo parted -l
Here's mine:
Code:
Model: ATA WDC WD800BB-75CA (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  80.0GB  80.0GB  primary  ntfs         boot


Model: ATA ST3500418AS (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  2000MB  1999MB  primary   ext4            boot, raid
 2      2001MB  500GB   498GB   extended
 5      2001MB  17.0GB  15.0GB  logical   ext4            raid
 6      17.0GB  37.0GB  20.0GB  logical   ext4            raid
12      314GB   400GB   85.9GB  logical   ext4
11      400GB   402GB   2146MB  logical                   raid
10      402GB   445GB   42.9GB  logical                   raid
 9      445GB   456GB   11.0GB  logical   ext4            raid
 8      456GB   499GB   42.9GB  logical
 7      499GB   500GB   1074MB  logical   linux-swap(v1)


Model: ATA ST3500418AS (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  2000MB  1999MB  primary   ext4            boot, raid
 2      2001MB  500GB   498GB   extended
 5      2001MB  17.0GB  15.0GB  logical   ext4            raid
 6      17.0GB  37.0GB  20.0GB  logical   ext4            raid
12      37.0GB  120GB   83.5GB  logical   ext4
11      400GB   402GB   2146MB  logical                   raid
10      402GB   445GB   42.9GB  logical                   raid
 9      445GB   456GB   11.0GB  logical   ext4            raid
 8      456GB   499GB   42.9GB  logical
 7      499GB   500GB   1074MB  logical   linux-swap(v1)


Model: Linux Software RAID Array (md)
Disk /dev/md0: 1998MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  1998MB  1998MB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md1: 30.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  30.0GB  30.0GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md2: 40.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  40.0GB  40.0GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md3: 85.9GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  85.9GB  85.9GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md4: 22.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  22.0GB  22.0GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md5: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  42.9GB  42.9GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md6: 2145MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  2145MB  2145MB  ext4
Partition 1 on both sdb and sdc are my /boot partitions, setup as RAID 1.
 
Old 09-11-2012, 08:03 AM   #8
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
user@debian:~$ sudo parted -l
Model: ATA WDC WD30EZRX-00M (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1000MB 999MB raid
2 1000MB 9500MB 8500MB raid
3 9500MB 59.5GB 50.0GB raid
4 59.5GB 3001GB 2941GB raid


Model: ATA WDC WD30EZRX-00M (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 1000MB 999MB raid
2 1000MB 9500MB 8500MB raid
3 9500MB 59.5GB 50.0GB raid
4 59.5GB 3001GB 2941GB raid


Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.
Ignore/Cancel? ignore
Model: TSSTcorp DVD+-RW TS-H653G (scsi)
Disk /dev/sr0: 1173MB
Sector size (logical/physical): 2048B/2048B
Partition Table: msdos

Number Start End Size Type File system Flags
it isn't showing the "md" that i made like it is yours.
 
Old 09-11-2012, 09:29 PM   #9
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 598

Rep: Reputation: 120Reputation: 120
I think this is a problem with how GRUB2 and GPT works together. Have a look at these:

http://lists.debian.org/debian-user/.../msg00595.html
http://www.rodsbooks.com/gdisk/booting.html
 
Old 09-12-2012, 01:43 PM   #10
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by towheedm View Post
I think this is a problem with how GRUB2 and GPT works together. Have a look at these:

http://lists.debian.org/debian-user/.../msg00595.html
http://www.rodsbooks.com/gdisk/booting.html
Okay... So how do I get my system up and running?
Use a knoppix disk to fix it? How?
 
Old 09-14-2012, 09:16 PM   #11
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 598

Rep: Reputation: 120Reputation: 120
Well it all depends on if your machine is BIOS-based or EFI-based. I would start by carefully reading through http://www.rodsbooks.com/gdisk/booting.html including all of the links on that page. It has a lot of info on setting up GPT with GRUB2 on both BIOS and EFI machines.

I have never used EFI or GPT, so have no idea at this point how to directly solve this. So sorry for that.
 
Old 09-19-2012, 04:49 PM   #12
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
Okay. I figured it out... Basically you create when doing the partition section from the install. Create a 10mb partition on both drives and set the "Use Type" to "Reserved BIOS boot area" for it instead of "Physical volume for RAID". Once the install is done install grub on the other drive

and that is it. I kept trying to RAID the small partition which does not provide you with the "Resesrved BIOS Boot area" under the "use type"
 
1 members found this post helpful.
Old 02-20-2013, 08:00 AM   #13
cypher_zero
LQ Newbie
 
Registered: Dec 2011
Posts: 12

Rep: Reputation: Disabled
I'm currently having a similar issue. The 10mb partition you refer to, what is that formatted as or is it unformatted?

Last edited by cypher_zero; 02-20-2013 at 08:07 AM.
 
Old 02-20-2013, 08:17 AM   #14
raksasas
LQ Newbie
 
Registered: Sep 2012
Posts: 29

Original Poster
Rep: Reputation: Disabled
You know, I don't know if it is formatted or formatted maybe someone else can explain what goes on with that 10mb partition. You make the 10mb partition when you are partitioning the drives followed by setting the flag on this partition to "Reserved BIOS boot area" instead of "Physical volume for RAID". The install does the rest...

Once logged into the system you have to add GRUB to the other drive since the install does not install GRUB on the other drive(s).

Hope this helps
 
Old 02-20-2013, 10:33 AM   #15
cypher_zero
LQ Newbie
 
Registered: Dec 2011
Posts: 12

Rep: Reputation: Disabled
Yes, thanks! I was having some trouble getting it to set that flag; turns out that you need to have a GPT partition table (which you have to manually specify if you're creating the partitions in Gparted as I was). Then it should just be a simple matter of setting the bios_grub flag (which you can do with a right-click in Gparted).

I'm still finishing up the install, so I don't know if this has completely fixed my issue, but hopefully I'm at least 1 step closer to where I need to be.

If you're curious, I've described the full problem here:
http://www.linuxquestions.org/questi...08#post4895708
 
  


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
Software RAID 1 GRUB solokron Linux - Server 3 05-04-2009 10:30 PM
Software raid issue....Debian Sarge. ldunsmo Linux - Server 2 04-06-2008 08:16 PM
Software Raid and GRUB. Guttorm Debian 3 07-27-2007 02:22 PM
software raid issue linuxgeek2940 Debian 4 05-02-2007 04:05 PM
Software Raid Issue jhotchkiss Linux - Software 1 09-16-2003 08:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 PM.

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