Installing SolydX on a RAID 1 array (A Convoluted Solution)

Post your tutorials and howtos here.
User avatar
rolgiati
Posts: 209
Joined: 08 Jun 2013 16:10

Installing SolydX on a RAID 1 array (A Convoluted Solution)

Postby rolgiati » 07 Aug 2014 13:22

Being dead keen on having my system on a RAID 1 array, and being unable to do a direct install as the SolydX live iso does not recognize those,http://forums.solydxk.com/viewtopic.php?f=13&t=4441 this how I have done it.

Health and safety warning: To do the same you will need to use the CLI, and work in a console with either sudo or su.

Needed: In addition to using a recent motherboard with a BIOS that knows RAID or AHCI, and putting in a second HD of the same size (for the RAID array) as the one you already use, an empty spare drive/HD big enough to save all your personal data is required. This can be a USB external unit, or installed inside the box on a spare SATA outlet (this seems to work faster than USB).

-First I downloaded (the use of bittorrent is a Good Idea) a recent Debian XFCE Install iso (Not Live !) from https://www.debian.org/CD/torrent-cd/ and transferred the iso on a USB pendrive with unetbootin.

- I installed the spare HD, and su'd in a console to copy/backup all my data:

Code: Select all

cp -rdpx /home /mnt/usb0  
cp -rdpx /etc /mnt/usb0
cp -rdpx /root /mnt/usb0
/mnt/usb0 is where SolydX automounted my extra internal HD
To make life easier in the future, I also saved /etc and /root, you will see why later. Data copying took over three hours with about 400 GB data; so I had to be patient...

-I then stopped the box, disconnected the extra drive and booted the Debian USB drive; following the instructions on creating equal partitions on drives, and configuring as RAID arrays.
Note: As I used several partitions for my system, I found it a time-saver, before booting the Debian Install, to boot a SolydX Live, and run (as root) sfdisk to copy the structure of the first HD onto the new second one with:

Code: Select all

# sfdisk -d /dev/sda | sfdisk --force /dev/sdb
-Once Debian was installed, stopped the box, reconnected the spare drive and rebooted.
After which it was time to restore the data with

Code: Select all

cp -frdpx /mnt/usb0/home/* /home/
cp -frdpx /mnt/usb0/etc /home/
cp -frdpx /mnt/usb0/root /
which again took three hours, and then return ownership of the users directories with

Code: Select all

chown -Rc user:user  /home/user
(Repeat as needed)

-Now comes the fun part: To turn the Debian system into a Solydx system, I changed the repositories in /etc/apt/sources.list with those I had saved in /home/etc/apt/sources.list (now was also a good time to copy back to /etc some config files like /etc/hosts an /etc/hosts.allow, to save retyping all the data)

-Then I got the SolydXK keys with

Code: Select all

apt-get install solydxk-keyring
(ignoring the warning message) then updated the system with

Code: Select all

apt-get update && apt-get upgrade && apt-get dist-upgrade
-It only remained to run synaptic, and install all those packages that are part of SolydX but not of the default Debian-XFCE install.
Note: The method of saving a list of installed packages with

Code: Select all

dpkg --get-selections >list_packages.txt
for later reinstallation with

Code: Select all

dpkg --set-selections <list_packages.txt
as explained in http://forums.solydxk.com/viewtopic.php?f=4&t=2768 fails to work if there is in the original installation a single package that is not present in the repositories, that you have installed from somewhere else ;-3(

Altogether, it has taken me a full day, and I still find (through rude emails from cron) that some programs used in scripts I run are missing; it also took me a while to realize that the total failure of my sound system was due to not installing pulse-audio.

Hope this may help; have fun.....

User avatar
rolgiati
Posts: 209
Joined: 08 Jun 2013 16:10

Re: Installing SolydX on a RAID 1 array (A Convoluted Soluti

Postby rolgiati » 12 Aug 2014 23:02

Later: I then realized I did not have all the progs of a default SolydX install; so to correct this, I connected a spare HD, booted the live USB iso, and did a clean install on the HD.

Then booting the HD I was able to get a list of all installed packages with

Code: Select all

dpkg --get-selections >vanilla
which I saved on a pen-drive.

I then rebooted my RAID install, opened the vanilla file in mousepad and globally replaced all the install at lines-end with a space, then removed all the tabs and CR-LF in the file with

Code: Select all

tr -d "\n\r" < vanilla >vanilla2
tr -d "\t" < vanilla2 >vanilla3
which left me with a space-separated list of the names of all the packages in the live-install.

It was then easy to apt-get install the whole list, and go for a walk while the computer did its thing.

Except it is a lie, there were problems with some packages that are part of the live-install, and are not in the repositories; those had to be pruned out of the list before running apt-get. and now, 554 packages later, I should have all the packages of the default SolydX install in place, most having replaced the Debian packages I started with.

the following packages are in the SolydX install, but not on the repositories:
python3.3
python3.3-apt
libpython3.3-minimal
libpython3.3-stdlib
python3.3-minimal

P.S. I warned you it was convoluted ;-3)

jericho
Posts: 12
Joined: 15 May 2014 01:19

Re: Installing SolydX on a RAID 1 array (A Convoluted Soluti

Postby jericho » 01 Oct 2014 12:03

A less convoluted solution:

Things you'll need:
1. Enough knowledge to manually partition your drives and set up your raid array
2. Enough knowledge to manually create your /etc/fstab

Process:
1. Boot into the SolydX cd and use the terminal to set up your raid array (first installing mdadm and anything else you
need)
2. Mount your raid array and any other partitions you need in /target (this should probably at least include a non-raid boot partition which would go in /target/boot, with the main raid partition being /target)
3. Change the installer to advanced mode by right-clicking on the icon on the desktop and changing the command in the "Application" tab to "gksudo "/usr/bin/live-installer --advanced""
4. Double click the installer, selecting the new "manually mount partitions" option (this is what you unlocked by invoking it in advanced mode)

At some point the installer will pause and tell you to create your fstab. Proceed to:
5. chroot into /target (chroot /target/)
6. install mdadm in your new install (apt-get install mdadm)
7. Create your new /etc/fstab (use any text editor you prefer)
8. Exit out of your chrooted environment (exit) and complete the install using the installer (click next)
9. Reboot into your new system


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests