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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-05-2019, 06:32 AM
|
#1
|
Member
Registered: Sep 2005
Posts: 201
Rep:
|
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?
|
|
|
05-05-2019, 07:04 AM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414
|
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.
|
|
|
05-05-2019, 08:52 AM
|
#3
|
Member
Registered: Sep 2005
Posts: 201
Original Poster
Rep:
|
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.
|
05-05-2019, 09:46 AM
|
#4
|
LQ Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573
|
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?
|
|
|
05-05-2019, 01:47 PM
|
#5
|
Member
Registered: Sep 2005
Posts: 201
Original Poster
Rep:
|
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.
|
05-05-2019, 02:56 PM
|
#6
|
LQ Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573
|
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
|
|
|
05-05-2019, 03:23 PM
|
#7
|
Member
Registered: Sep 2005
Posts: 201
Original Poster
Rep:
|
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.
|
05-05-2019, 06:36 PM
|
#8
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414
|
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.
|
05-05-2019, 11:08 PM
|
#9
|
Member
Registered: Sep 2005
Posts: 201
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|