LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-05-2019, 06:32 AM   #1
Jykke
Member
 
Registered: Sep 2005
Posts: 201

Rep: Reputation: 19
Migrating Linux from USB to SSD for a server


I have been running a self-made NAS in my cellar for some time. I have Ubuntu Server on a USB stick and then some disks in a RAID (at the moment already forgotten which RAID and how many disks). The RAID is done in Ubuntu.

Now I get some problems with the USB and I am gradually coming to the conclusion that it was not maybe the most brilliant choice of hardware. I just wanted to keep it separate from the harddrives and RAID so I ended up doing it this way.

Now, I think principally that I can copy the OS from USB to a SSD using my desktop. I ordered a USB to SATA cable so how do I do it, with 'dd'?

What do I need to change afterwards that my server system will boot on the SSD? Boot order in BIOS? I also need to modify the fstab on the copied system.

Is there anything else? The information about the RAID and stuff like that should be actually copied?
 
Old 05-05-2019, 07:04 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414

Rep: Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197
Given the need for new hardware support, I would reinstall from scratch. Rebuilding the array is simple as is re-building the mdadm.conf.
Much safer, and surely will result in a "better" system.
 
Old 05-05-2019, 08:52 AM   #3
Jykke
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 19
I don't think I need any drivers or anything like that, but, yes you might be right. It could be cleaner to re-install and then migrate the RAID. I think I need to google how to accomplish that, I am just pretty scared on loosing the stuff as I really can not backup the volume. The machine boots and so on, but the USB-drive is given me some crap about being read only. At the moment I can not access the samba or anything. If I got samba up, I might try to back-up my photos. Well, another problem...
 
1 members found this post helpful.
Old 05-05-2019, 09:46 AM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
The usb is coming up read-only because for some reason Ubuntu mounts the usb as a cdrom/dvd therefore read-only.
Is it possible for you to use anohter distro or even pure debian?

Is your ubuntu running as a usb install or is it a full install like to hard drive?
 
Old 05-05-2019, 01:47 PM   #5
Jykke
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 19
It used to work just fine (rw that is) for over two years now, I wonder if there was some update that broke something or whether the stick actually got something. Anyway, quite a bit of hits searching for the topic. It is a full install on the stick, like I said I wanted to have a minimal system on something slim that I can easily distinguish from RAID harddrives and preferably would not eat up a SATA port. Well, lateron I noticed I am never going to expand it so much (at least with that hardware) so I can afford to spend a port for a small SSD.
 
1 members found this post helpful.
Old 05-05-2019, 02:56 PM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
ah thats weird its saying read only then......
If you're going for a reinstall Id think about which distro to use as the newer ubuntu's seem buggy
 
Old 05-05-2019, 03:23 PM   #7
Jykke
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 19
I use an LTS version, I don't think I will be changing the distro, I have gone through couple of them, loved Gentoo the most, but it's too much work. I have also other PCs (one in my living room) hanging on my NAS. I sort of rely having same versions on my PCs, I also have DVB-S2 cards on my NAS-Machine running tvheadend and that is used by my living room PC running kodi.

Anyway if I copy the mdadm.conf to the new installation how do I bring it up? I only found some stuff about scanning and rebuilding it in case of having lost that file...what is the regular procedure?
 
1 members found this post helpful.
Old 05-05-2019, 06:36 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414

Rep: Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197Reputation: 4197
USB keys are disposable - consider yourself lucky it lasted this long. Going read-only is probably a result of mount options in fstab - it's the filesystem trying to protect itself from hardware errors.
Ubuntu LTS is fine - stick with it if you are comfortable. You'll have to re-install packages you need; samba and the like. If you can't pull the config(s) from the USB, just do it again from scratch.

As for the RAID, any decent liveCD should assemble it for you - may have a different name than you're used to though. A simple "mdadm --assemble --scan" should suffice if needed. DO NOT use --create. After the install, which should do all that for you if the array is attached, you can check you have a mdadm.conf - else simply use "mdadm --detail --scan >> /etc/mdadm.conf"; check that file location, I don't use Ubuntu.

Last edited by syg00; 05-05-2019 at 06:37 PM.
 
1 members found this post helpful.
Old 05-05-2019, 11:08 PM   #9
Jykke
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 19
Yes, that is most probably the case - I thought that mdadm --assemble --scan rebuilds the mdadm.conf, ok, I'll check that.
New SSD should arrive tomorrow. I can access the USB and pull the configs, yesterday I could also backup the most important data from
the NAS, so I am good to go - just need to have the time for it.
 
  


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
Install Linux in Toshiba u940 series with 32gb ssd and 750gb hdd I would like to have boot code in ssd only cvkchary Linux - Laptop and Netbook 4 08-31-2016 04:26 PM
Migrating OS to SSD Lhd303 Linux - Newbie 3 03-25-2013 12:50 PM
Migrating existing partitions to SSD + HDD memilanuk Linux - General 6 03-24-2013 02:26 PM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:43 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
Open Source Consulting | Domain Registration