Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4952

Beginners • Re: Reinstall raspian with an existing NAS

$
0
0
Thanks for the information. My plan was to install a fresh copy of bookworm on a new sd card. I would make sure that the 4 drives were not connected. I would then configure the fresh install with all the apps that I have currently on my existing ssd first - ignoring the NAS for the moment. Once everything is working the way I wanted I would then connect the 4 NAS drives and install the nas sofware (mdadm and webmin)
would the two files a shold have a backup of are: the existing /mnt/etc/fstab and /mnt/cmdline.txt

That's the most sensible way to do it. But you won't be able to access /mnt/etc/fstab and /mnt/cmdline.txt at the same time. One is on the SSD's root partition the other on its boot partition and you can't have both mounted on /mnt at the same time.

Do not copy the old fstab. Copy and ammend the extra entries you have added for the RAID array. If you haven't already done so, include nofail in the mount options for the old SSD and the RAID array so you can boot with them disconnected.

Be aware that Bookworm mounts the boot partition on /boot/firmware not on /boot.

I know nothing about webmin as I don't use it. I manage my NAS and its users via the existing command line tools.

Besides the stuff mentioned in the guide I linked to you probably also want to copy the entire contents of /home but be aware that a straight cp will mangle ownership and groups (they'll change to those of the user doing the copy). rsync is a better choice, something like

Code:

sudo rsync -axrvH /mnt/home /home
where /mnt/home is the old OS installation.

If you're (re)creating users rather than restoring /etc/password and /etc/shadow make sure you do so with the same numeric user and group IDs as on the old OS. It's the numeric ID that matters not the user/group name. If user fred had ID 1000 and ginger 1001 on the old OS but the other way around on the new OS, they'll own each others files.

You may also want to copy /etc/sudoers and the contents of /etc/sudoers.d

You will want to recreate the mount point for the RAID array on the new OS installation.

I've no idea what files you need to copy for webmin.

Bookworm also doesn't use dhcpcd.conf for network configuration. It's all done through Network Manager (or the really old way /etc/network/interfaces or /etc/network/interfaces.d). It's best to get things working using the default DHCP connection then switch to a static IP later if you need one (or better yet leave it as DHCP and have your router reserve an IP address for your Pi's MAC address). The command line tools you'll need are nmcli pure command line and nmtui a text based menu system.

For other difference between Bookworm and previous OS releases see Bookworm vs Bullseye - A Guide

You do not have to disconnect the RAID array (as advised by fbe) but if it isn't connected you can't accidentally damage it or its contents.

It should go without saying that you need to be very careful about which device nodes and paths you're writing to (and reading from). Get it wrong and both your new SD and old SSD could become both unbootable and unrecoverable.

And both RPL's SD card copier and ronr's tools will erase everything on the target drive.

Oh, and to make sure you're booting from the SD card, only connect the SSD after booting from SD has completed.

It's a fair bit of work so you might want to leave things as they are but if you do be aware that you likey won't get even security updates though that depends on how old your existing OS installation is.

Statistics: Posted by thagrol — Tue Feb 06, 2024 12:48 am



Viewing all articles
Browse latest Browse all 4952

Trending Articles