Install Linux Mint 17 to mdadm RAID array

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
bennabiy
Level 1
Level 1
Posts: 9
Joined: Thu Aug 01, 2013 11:02 am

Install Linux Mint 17 to mdadm RAID array

Postby bennabiy » Thu Dec 03, 2015 12:31 pm

NOTE - This has been edited to give a little more clarity, and to indicate when information in a command needs to be modified based on local settings / system.

*****************************************************************************
Please read all comments before just running commands - Make sure you understand what you are doing before doing it :)

To install mint 17 to a mdadm raid array (existing) -

Code: Select all

mint@mint:~ $ sudo su -
root@mint:~ # apt-get install mdadm

which will install the mdadm to the live environment (note - this is temporary and only applies to the current booted session. If you reboot, you will need to do this step again).

Code: Select all

root@mint:~ # mdadm --assemble --scan

which activates the existing raid array. If you do not have a raid array set up, please look online for more documentation on proper setup of a mdadm software raid. This is beyond the scope of this post.

Now from this point, if you tried to run the installer, it will show you the raid drive(s) and will seem like all is well. It will fail when it goes to install grub-efi-amd64-signed because the chroot it created to install to does not have mdadm installed, and the installer will bail out, not finishing the install process including cleanup.

To avoid this mess, launch the installer from the command line with the option -b.
Open a terminal (on most systems, CTRL-ALT-T is a shortcut for this, otherwise open Mate Terminal) and then run the following:

Code: Select all

root@mint:~ # ubiquity -b


This will finish normally, and then close the installer. DO NOT select the option to reboot. Say you want to continue testing. If you reboot at this stage, you will not be able to boot up.

Next you will need to do the manual chroot setup / install of grub.

Code: Select all

root@mint:~ # mount /dev/md127p1 /mnt; mount /dev/sda2 /mnt/boot/efi
root@mint:~ # for i in /dev /dev/pts /sys /proc; do mount --bind $i /mnt$i; done
root@mint:~ # echo "nameserver 4.2.2.4" > /mnt/etc/resolv.conf
root@mint:~ # chroot /mnt


Here is a breakdown of the commands:
Assuming that /dev/md127p1 is my / raid partition (yours could be different)
/dev/sda2 is my EFI boot partition (which mounts at /boot/efi normally) (yours could be different)
/mnt is an empty folder which exists, functioning as our place to "build" our directory structure for the new system. You could use any folder which exists, and replace /mnt in the following commands with the full path to the folder you choose.

The following line:

Code: Select all

root@mint:~ # mount /dev/md127p1 /mnt; mount /dev/sda2 /mnt/boot/efi

mounts your root raid partition to /mnt (this could be any empty, but existing folder) and then mounts the EFI boot partition within the correct folder inside the root partition.
/dev/sda2 would change to whatever partition you set for your EFI boot partiton

The following:

Code: Select all

root@mint:~ # for i in /dev /dev/pts /sys /proc; do mount --bind $i /mnt$i; done

bind mounts (basically a way to have a folder in two places at once) certain directories into your new root partition. These directories are essential for being able to install software and such in a later step.

The following:

Code: Select all

root@mint:~ # echo "nameserver 4.2.2.4" > /mnt/etc/resolv.conf

writes a nameserver for dns resolution within the new root, allowing for software install (this will be overwritten upon your actual running of the system and is temporary)

The following:

Code: Select all

root@mint:~ # chroot /mnt

switches to your new environment you just set up and will be just like you were booted to it. This allows you to install software, edit configs etc as if you were booted to the system in console mode.

man pages are a great resource for finding out about commands as well, if what I have said does not make sense...

e.g.

Code: Select all

$ man chroot
$ man mount


At this point, you should be looking at the directory structure of your new install on your new drive (PLEASE remember to replace the devices, including the raid devices with names that fit your system) I figure if you are following this, you are at least a little knowledgeable about these kinds of things.

Next install mdadm into your chroot:

Code: Select all

root@mint:/ # apt-get install mdadm
...
root@mint:/ # apt-get install shim-signed grub-efi-amd64-signed


After that all should be well and then it is just manual cleanup of mounts left to do.

Code: Select all

root@mint:/ # exit
root@mint:~ #for i in dev/pts dev sys proc; do umount /mnt/$i; done
root@mint:~ # exit
mint@mint:~ $

(Remember - if you changed /mnt in the previous commands, remember to do so here as well)

Then you should be ready to install grub to your /dev/sda (fill in the proper device for your system)
this should match whatever you have as your boot drive. It could be /dev/sdb or /dev/sdc etc...

Code: Select all

mint@mint:~ $ sudo grub-install /dev/sda


Reboot and it "should work"

Hope this helps!
Last edited by bennabiy on Sun Apr 23, 2017 11:56 am, edited 1 time in total.

i8igmac
Level 1
Level 1
Posts: 10
Joined: Fri Mar 02, 2012 5:50 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby i8igmac » Thu Dec 31, 2015 1:29 am

i have been searching for threads related to 'raid linux mint install'... trying to understand this process...

so, im trying to setup raid0. maybe i misunderstand the partitioning structure.

i have 2 identical ssd's, both partitioned in the same way...

Code: Select all

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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: 0x000d7015

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048       53247       25600   83  Linux
/dev/sda2           53248   234441647   117194200   83  Linux



Code: Select all

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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: 0x00082905

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048       53247       25600   83  Linux
/dev/sdb2           53248   234441647   117194200   83  Linux


Code: Select all

sudo mdadm --create /dev/md1 --verbose --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1
sudo mdadm --create /dev/md2 --verbose --level=0 --raid-devices=2 /dev/sda2 /dev/sdb2


so, now i have 2 raid arrays, md1 and md2... i dont plan on using linux-swap as my understanding is this will preserve the life of the ssd's...

is this how a person would start off the install? it would really help to see instructions for setting up the partitions... or is this not the way it should be done?

User avatar
coffee412
Level 5
Level 5
Posts: 732
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Install Linux Mint 17 to mdadm RAID array

Postby coffee412 » Thu Dec 31, 2015 6:52 am

Have you seen this?

http://raider.sourceforge.net/

I used it to convert my single install to a Raid1 without a hitch.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp * Samba AD * Mint 18.1 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36

i8igmac
Level 1
Level 1
Posts: 10
Joined: Fri Mar 02, 2012 5:50 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby i8igmac » Thu Dec 31, 2015 11:25 am

raider does look useful, but i dont see the option for raid0.

User avatar
coffee412
Level 5
Level 5
Posts: 732
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Install Linux Mint 17 to mdadm RAID array

Postby coffee412 » Thu Dec 31, 2015 12:31 pm

i8igmac wrote:raider does look useful, but i dont see the option for raid0.


Oops. I guess it doesnt do raid0.

sorry.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp * Samba AD * Mint 18.1 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36

Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Thu Dec 31, 2015 4:20 pm

is this how a person would start off the install?

As bennabiy mentioned the installer will not install the necessary software raid mdadm package. Basically a workaround would be to launch the installer with the "-b" option to not install the bootloader otherwise the installer would fail to successfully complete the installation process.

So you can prepare your md raid devices and create the filesystem on top of them before launching the installer with "ubiquity -b", then select Installation type "Something else", assign your partitions and install. Once the installer completes do not reboot. You then have to chroot to the newly installed system and install the missing mdadm package and grub bootloader.
Image

i8igmac
Level 1
Level 1
Posts: 10
Joined: Fri Mar 02, 2012 5:50 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby i8igmac » Thu Dec 31, 2015 10:04 pm

so, what i have just tried...

i formated 2 identicle hard drives to ext4
/dev/sda1 2048 234441647 117219800 fd Linux raid autodetect
/dev/sdb1 2048 234441647 117219800 fd Linux raid autodetect

and now mdadm is used to create the raid0 or md0

i then launched the installer `ubiquity -b`

i pressed 'something else'

i selected md0 and created 2 partitions
md0p1 = /boot for 50mb
md0p2 = / for the rest of the hard disk
(no swap)

the installation completed, i then attempted to mount and prepare grub...

mount /dev/md0p1 /mnt; mount /dev/sda2 /mnt/boot/efi

so, here was my confusion and exected problem... of course sda wont mount because sda2 dont exist... There is a sda1 ext4 that makes up the raid0 device... it looks like i need to start over and remove the mdadm raid device and prepare the partitions on each hard drive properly...

im not sure what this properly partition table should look like... i hope to resolve this confusion and help produce a tutorial for the steps i take ;-)

Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Fri Jan 01, 2016 9:16 am

50MB for /boot is not enough, I would recommend 256MB.
If your machine boots in EFI mode I would suggest the following partitions,
GPT layout, drive sda:
- sda1 256MB FAT32 ESP (EFI System Partition)
- sda2 120GB type FD00

GPT layout, drive sdb:
- sdb1 256MB type 0700
- sdb2 120GB type FD00

Create the md raid0 device and format to ext4, if you don't create the ext4 filesystem the installer will not offer to directly assign md0, there is no point in creating extra partitions like md0p1 on top of md0:

Code: Select all

sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb2
sudo mkfs.ext4 /dev/md0

Then launch the installer using "ubiquity -b", installation type "Something else" and assign /dev/md0 to "/" ext4 filesystem. Install.
Once done do not reboot, open a terminal:

Code: Select all

sudo mount /dev/md0 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
sudo mount -o bind /dev /mnt/dev
sudo chroot /mnt mount /proc
sudo chroot /mnt mount /sys
sudo chroot /mnt mount /dev/pts
sudo cp -a /run/resolvconf/resolv.conf /mnt/run/resolvconf/resolv.conf
sudo su
chroot /mnt
apt update
apt install mdadm
apt install shim-signed
grub-install
sync
exit
exit

Shutdown, remove the flash drive and reboot.
Image

i8igmac
Level 1
Level 1
Posts: 10
Joined: Fri Mar 02, 2012 5:50 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby i8igmac » Fri Jan 01, 2016 11:19 pm

I do apologize, it looks like my machine is not running efi mode
i thought i looked in the bios and enabled UEFI..
so i looked online and ran this command from a live usb dmesg | grep "EFI v" and i see it dont exist...

I did follow your previous instructions, and after i reboot i was brought to a grub terminal... looks like im getting closer... i notice there was a error after i installed mdadm inside the chroot... i may start the process over and try again...

im back in the live usb stick, this is what my hard drives currently look like...

Code: Select all

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      526335      262144   83  Linux
/dev/sda2          526336   234441647   116957656   fd  Linux raid autodetect



Code: Select all

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048      526335      262144   83  Linux
/dev/sdb2          526336   234441647   116957656   fd  Linux raid autodetect


Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Sat Jan 02, 2016 12:02 pm

i notice there was a error after i installed mdadm inside the chroot

The error message is harmless.

You probably did not select to boot in EFI mode. Plug in the live usb flash drive and upon powering on look for a boot menu option in your firmware/Bios to boot the live usb in EFI mode.

Since your machine has an EFI firmware you should install in EFI mode. From the live environment open a terminal:

Code: Select all

[ -d /sys/firmware/efi ] && echo "EFI mode" || echo "BIOS mode"

Should return EFI mode.

Your drives are currently using the msdos/MBR partition table layout, you should use the GPT layout in EFI mode, from gparted > Device > Create Partition Table > select gpt > Apply. EFI mode needs a 64bit LM version.
Here is an example of drive partitions from a 10GB disk image:

Code: Select all

sudo gdisk -l /dev/loop0
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/loop0: 20971520 sectors, 10.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): A3902387-763B-447A-9159-84900DCB3649
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 20971486
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          526335   256.0 MiB   EF00  EFI System
   2          526336        20971486   9.7 GiB     FD00  Linux RAID


If you want to install in Legacy BIOS compatibility mode then use the msdos/MBR layout for the drives. Here is an example of drive partition from a 10GB disk image, only one partition, no separate /boot partition:

Code: Select all

sudo fdisk -l /dev/loop0

Disk /dev/loop0: 10.7 GB, 10737418240 bytes
107 heads, 17 sectors/track, 11529 cylinders, total 20971520 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: 0x4ee9a49e

      Device Boot      Start         End      Blocks   Id  System
/dev/loop0p1            2048    20971519    10484736   fd  Linux raid autodetect

Create the md raid0 array device:

Code: Select all

sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1
sudo mkfs.ext4 /dev/md0

Same installation procedure, chroot differs slightly:

Code: Select all

sudo mount /dev/md0 /mnt
sudo mount -o bind /dev /mnt/dev
sudo chroot /mnt mount /proc
sudo chroot /mnt mount /sys
sudo chroot /mnt mount /dev/pts
sudo cp -a /run/resolvconf/resolv.conf /mnt/run/resolvconf/resolv.conf
sudo su
chroot /mnt
apt update
apt install mdadm
apt install grub-pc
grub-install /dev/sda
grub-install /dev/sdb
sync
exit
exit


Reboot
Image

i8igmac
Level 1
Level 1
Posts: 10
Joined: Fri Mar 02, 2012 5:50 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby i8igmac » Sat Jan 02, 2016 7:43 pm

I do appreciate your guys help... i think i still fail to partition my hard disk's properly and i apologize :oops: ...this is the first time i have seen gdisk and efi related threads...
i did find the option in bios to boot from uefi device but it responded with 'no devices found'

So, at this point your previous instructions seem spot on...
i started with gparted deleting the data on sda+sdb and changing both from dos to gpt...
and here is my first attempt using gdisk... sda and sdb

Code: Select all

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.

Command (? for help): p
Disk /dev/sda: 234441648 sectors, 111.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7E28BA93-F04A-41B2-85D0-BDB437030E56
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 234441614
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          526335   256.0 MiB   EF00  EFI System
   2          526336       234441614   111.5 GiB   FD00  Linux RAID



Code: Select all

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.

Command (? for help): p
Disk /dev/sdb: 234441648 sectors, 111.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3649F0D1-ED1B-4145-9492-CDDA0A3FC087
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 234441614
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          526335   256.0 MiB   8300  Linux filesystem
   2          526336       234441614   111.5 GiB   FD00  Linux RAID




and now im looking at your last 2 commands, grub-install /dev/sda grub-install /dev/sdb
i fail again :cry:

Code: Select all

mint / # grub-install /dev/sda
Installing for i386-pc platform.
grub-install.real: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install.real: error: embedding is not possible, but this is required for RAID and LVM install.
mint / # grub-install /dev/sdb
Installing for i386-pc platform.
grub-install.real: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install.real: error: embedding is not possible, but this is required for RAID and LVM install.

Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Sat Jan 02, 2016 8:01 pm

Drives partitions are correct.
and now im looking at your last 2 commands, grub-install /dev/sda grub-install /dev/sdb
i fail again 

Because grub-install /dev/sda and grub-install /dev/sdb is not for EFI mode, only for legacy BIOS mode.

EFI mode, chroot procedure:

Code: Select all

sudo mount /dev/md0 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
sudo mount -o bind /dev /mnt/dev
sudo chroot /mnt mount /proc
sudo chroot /mnt mount /sys
sudo chroot /mnt mount /dev/pts
sudo cp -a /run/resolvconf/resolv.conf /mnt/run/resolvconf/resolv.conf
sudo su
chroot /mnt
apt update
apt install mdadm
apt install shim-signed
grub-install
sync
exit
Image

i8igmac
Level 1
Level 1
Posts: 10
Joined: Fri Mar 02, 2012 5:50 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby i8igmac » Sat Jan 02, 2016 8:09 pm

OMG I LOVE YOU GUYS :o

so, i made a quick change to sdb, set it as EF02 BIOS boot partition... then installed grub and my system booted up in 3 seconds

Code: Select all

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/sdb: 234441648 sectors, 111.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3649F0D1-ED1B-4145-9492-CDDA0A3FC087
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 234441614
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          526335   256.0 MiB   EF02  BIOS boot partition
   2          526336       234441614   111.5 GiB   FD00  Linux RAID


So, sda i can still setup with the chroot procedure you just provided? and have (legacy/sdb) and (efi/sda) boot options?

seems like a bug during boot i see: diskfilter writes are not supported

Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Sat Jan 02, 2016 8:17 pm

Good job, I guess your machine is set to boot in Legacy BIOS mode then ;)
Since you installed in legacy BIOS mode and could boot up, stick to current settings :)
Last edited by Laurent85 on Sat Jan 02, 2016 8:31 pm, edited 2 times in total.
Image

Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Sat Jan 02, 2016 8:30 pm

seems like a bug during boot i see: diskfilter writes are not supported

It's an harmless warning don't worry.

You can also change sda1 partition type to EF02. Then from your now running raid0 system you can also install grub to sda:

Code: Select all

sudo grub-install /dev/sda
Image

ivan-the-idiot
Level 2
Level 2
Posts: 96
Joined: Thu Feb 25, 2016 9:59 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby ivan-the-idiot » Fri Feb 26, 2016 7:08 pm

i8igmac wrote:raider does look useful, but i dont see the option for raid0.


Remember the 0 in RAID-0 indicates how much data you'll get back after one of the drives fail ...

That said, I use RAID-1 but I set it up after installation for my /home directory. I'll reinstall the OS if I have a crash, no problem. But /home/idiot must be protected!

HankB
Level 2
Level 2
Posts: 53
Joined: Wed Nov 09, 2011 9:43 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby HankB » Sat Feb 27, 2016 10:46 pm

Many thanks for the useful information. I ran into another difficulty with this. My situation was that I wanted to migrate an existing installation (/ and /home partitions) to a pair of RAID0 SSDs. In this regard the situation was a little different because mdadm was already installed on the destination. However I did run into another difficulty and I thought I'd share that. while running a live CD (from a USB) and in the chroot environment I got the following message trying to setup grub.

Code: Select all

mint / # grub-install /dev/sda
Installing for i386-pc platform.
grub-install.real: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install.real: error: embedding is not possible, but this is required for RAID and LVM install.
mint / #

A little googling found the solution at https://bbs.archlinux.org/viewtopic.php?id=198066
I was able to add the "BIOS Boot Partition" without disturbing the rest.

Code: Select all

mint ~ # gdisk /dev/sda
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.

Command (? for help): r

Recovery/transformation command (? for help): x

Expert command (? for help): l
Enter the sector alignment value (1-65536, default = 2048): 34

Expert command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): EDF096D6-D3EB-4B37-A15E-F1937E072D7D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 34-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1         2097152        41945087   19.0 GiB    FD00 
   2        41945088       976773119   445.8 GiB   FD00 
   3            2048         2097151   1023.0 MiB  EF00 

Expert command (? for help): m

Command (? for help): n
Partition number (4-128, default 4): 4
First sector (34-976773134, default = 34) or {+-}size{KMGTP}: 34
Last sector (34-2047, default = 2047) or {+-}size{KMGTP}: 2047
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): ef02
Changed type of partition to 'BIOS boot partition'

Command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): EDF096D6-D3EB-4B37-A15E-F1937E072D7D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 34-sector boundaries
Total free space is 15 sectors (7.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1         2097152        41945087   19.0 GiB    FD00 
   2        41945088       976773119   445.8 GiB   FD00 
   3            2048         2097151   1023.0 MiB  EF00 
   4              34            2047   1007.0 KiB  EF02  BIOS boot partition

Command (? for help): wq

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
mint ~ #


After this

Code: Select all

mint ~ # chroot /mnt/root
mint / # grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
mint / #


:D :D :D

dspicer60
Level 1
Level 1
Posts: 2
Joined: Wed Aug 03, 2016 12:51 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby dspicer60 » Wed Aug 03, 2016 1:01 pm

I'm using Mint Cinnamon 18 and when I got to mounting drives I got these results.

mint ~ # mount /dev/md127p1 /mnt; mount /dev/sda2 /mnt/boot/efi
mount: special device /dev/md127p1 does not exist
mount: mount point /mnt/boot/efi does not exist
mint ~ # for i in /dev /dev/pts /sys /proc; do mount --bind $i /mnt$i; done
mount: mount point /mnt/dev does not exist
mount: mount point /mnt/dev/pts does not exist
mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist

dspicer60
Level 1
Level 1
Posts: 2
Joined: Wed Aug 03, 2016 12:51 pm

Re: Install Linux Mint 17 to mdadm RAID array

Postby dspicer60 » Wed Aug 03, 2016 8:06 pm

dspicer60 wrote:I'm using Mint Cinnamon 18 and when I got to mounting drives I got these results.

mint ~ # mount /dev/md127p1 /mnt; mount /dev/sda2 /mnt/boot/efi
mount: special device /dev/md127p1 does not exist
mount: mount point /mnt/boot/efi does not exist
mint ~ # for i in /dev /dev/pts /sys /proc; do mount --bind $i /mnt$i; done
mount: mount point /mnt/dev does not exist
mount: mount point /mnt/dev/pts does not exist
mount: mount point /mnt/sys does not exist
mount: mount point /mnt/proc does not exist


maybe this will help:
mint ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 487M 0 part
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 232.4G 0 part
└─isw_cjdccfafid_ARRAY 252:0 0 232.8G 0 dmraid
├─isw_cjdccfafid_ARRAY1 252:1 0 487M 0 part
├─isw_cjdccfafid_ARRAY2 252:2 0 1K 0 part
└─isw_cjdccfafid_ARRAY5 252:3 0 232.4G 0 part
├─mint--vg-root 252:4 0 227.9G 0 lvm
└─mint--vg-swap_1 252:5 0 4.5G 0 lvm [SWAP]
sdb 8:16 0 232.9G 0 disk
├─sdb1 8:17 0 487M 0 part
├─sdb2 8:18 0 1K 0 part
├─sdb5 8:21 0 232.4G 0 part
└─isw_cjdccfafid_ARRAY 252:0 0 232.8G 0 dmraid
├─isw_cjdccfafid_ARRAY1 252:1 0 487M 0 part
├─isw_cjdccfafid_ARRAY2 252:2 0 1K 0 part
└─isw_cjdccfafid_ARRAY5 252:3 0 232.4G 0 part
├─mint--vg-root 252:4 0 227.9G 0 lvm
└─mint--vg-swap_1 252:5 0 4.5G 0 lvm [SWAP]
sr0 11:0 1 1.6G 0 rom /cdrom
sr1 11:1 1 1024M 0 rom
loop0 7:0 0 1.5G 1 loop /rofs
mint ~ #

Laurent85
Level 13
Level 13
Posts: 4851
Joined: Tue May 26, 2015 10:11 am

Re: Install Linux Mint 17 to mdadm RAID array

Postby Laurent85 » Thu Aug 04, 2016 7:22 am

What are you trying to do ? Your computer is setup to use Fake Raid (dmraid). This howto addresses software raid installation (mdadm).
Image


Return to “Installation & Boot”