Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
2
answers
5021
views
How to clone / move entire Fedora installation onto larger disk with minimal changes to the system?
## Scenario I have an SSD in my computer (250GiB), with both `/boot` and `/`/`/home` partitions on it. I'd like to move that into a new M.2 NVME drive which is much larger (1TiB). The distro I'm using is Fedora 37. my `/etc/fstab` looks like this: ``` # # /etc/fstab # Created by anaconda on Tue Jun...
## Scenario
I have an SSD in my computer (250GiB), with both
/boot
and /
//home
partitions on it.
I'd like to move that into a new M.2 NVME drive which is much larger (1TiB).
The distro I'm using is Fedora 37.
my /etc/fstab
looks like this:
#
# /etc/fstab
# Created by anaconda on Tue Jun 28 05:26:41 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=5ed1bf26-ab2f-4e5a-ab5e-d2d56f5f3803 / btrfs subvol=root,compress=zstd:1 0 0
UUID=a14f6d42-3a64-4f96-856c-51e0f4344481 /boot ext4 defaults 1 2
UUID=5ed1bf26-ab2f-4e5a-ab5e-d2d56f5f3803 /home btrfs subvol=home,compress=zstd:1 0 0
lsblk
looks like this:
NAME KNAME PATH TYPE MODEL STATE RO RM HOTPLUG FSTYPE FSVER LABEL PTTYPE PARTTYPE PARTTYPENAME PARTLABEL PARTFLAGS SIZE FSSIZE FSAVAIL
sda sda /dev/sda disk Samsung SSD 850 EVO 250GB running 0 0 0 dos 232.9G
├─sda1 sda1 /dev/sda1 part 0 0 0 ext4 1.0 dos 0x83 Linux 0x80 1G 973.4M 608.1M
└─sda2 sda2 /dev/sda2 part 0 0 0 btrfs fedora_localhost-live dos 0x83 Linux 231.9G 231.9G 108.3G
zram0 zram0 /dev/zram0 disk 0 0 0 7.5G
**Note:** both /
and /home/
are subvolumes of the same partition! They're not on individual partitions as such.
## Problem
How would I go about doing this, with minimal interruption to my work time?
I thought I'd boot up a live distro with gparted
and then move partitions over, but since there are UUIDs scattered all over my current setup, I think I might run into problems, also I'm not sure this is the preferred method.
As a *bonus*, I suppose, I'd like a swap partition on my hard drive, that is larger than my current amount of RAM (8GB). Currently, I only use ZRAM, but I'd like to have a swap partition that is larger (perhaps twice in size) than my current amount of RAM, so that I can safely put my computer into hibernation. Also, more swap would be quite good for my VMs, and I'm struggling running more than around two VMs, currently.
This is roughly how I think I should go about this:
1. I thought I'd clone the current layout onto my 1TB drive, however I'm not sure which tool to use would be best, leaving a large chunk of the drive empty.
2. I'd then create a swap partition towards the end of the un-allocated space.
3. And then enlarge my /dev/sda2
partition, so that I can use the entirety of my drive, etc.
Please advise the order of procedure (step 0 would be to create a backup, obviously), as well as the tools I should perhaps try out, etc.
polemon
(11921 rep)
Feb 6, 2023, 03:46 PM
• Last activity: Apr 28, 2025, 12:03 PM
2
votes
1
answers
3419
views
Migrate from thunderbird to sylpheed while preserving folder structure
Is there an automatic way migrate a `thunderbird` mailbox to `sylpheed` while preserving the folder structure. I tried the importexport extension for `thunderbird` and got a directory with multiple mbox files and subfolder which contain again mbox file. For example inbox1 inbox2 foo.sdb foo1inbox1 f...
Is there an automatic way migrate a
thunderbird
mailbox to sylpheed
while preserving the folder structure. I tried the importexport extension for thunderbird
and got a directory with multiple mbox files and subfolder which contain again mbox file.
For example
inbox1
inbox2
foo.sdb
foo1inbox1
foo2inbox1
foofoo.sdb
foofoo1inbox1
foofoo1inbox2
foo2.sdb
foo2inbox1
foo2inbox2
Sure I can import manually every single mbox file with sylpheed, but is there an automatic way to import all at once and preserve the folder structure?
student
(18865 rep)
Aug 21, 2012, 02:07 PM
• Last activity: Apr 19, 2025, 04:04 AM
3
votes
2
answers
1850
views
Migrating the KDE configuration files
I'm a KDE user, and When I switch Linux distributions, I don't want to copy my entire home folder, since most of the configuration files there will be created automatically when I install\run programs on the new installation. There are, however, some applications that I've put a lot of work into the...
I'm a KDE user, and When I switch Linux distributions, I don't want to copy my entire home folder, since most of the configuration files there will be created automatically when I install\run programs on the new installation.
There are, however, some applications that I've put a lot of work into their configuration, and I like to hand-pick their configuration files that I want to migrate to the new installation.
Now, I'm having trouble doing that with the KDE configuration itself - I can't find my way around the
.kde
and .kde4
. I don't want to migrate the entire folder - but I need some specific settings from there.
So, the question is - what do I need to do to migrate the following KDE settings:
- File associations
- Activities
That's it. I need a way to migrate those - be it copying specific files, copying parts of files, or using a tool.
Thanks in advance!
Idan Arye
(523 rep)
Mar 14, 2012, 07:11 PM
• Last activity: Mar 12, 2025, 01:59 AM
0
votes
0
answers
33
views
Adding a New Server to Existing Proxmox Cluster - Network Configuration and VM Communication
I’m looking for some guidance on expanding my Proxmox setup. Here’s my current setup and what I’m trying to achieve: Current Setup - I have a dedicated OVH server running Proxmox. - On this server, I have a pfSense VM that handles VPN access for employees to connect to the internal network. - The s...
I’m looking for some guidance on expanding my Proxmox setup. Here’s my current setup and what I’m trying to achieve:
Current Setup
- I have a dedicated OVH server running Proxmox.
- On this server, I have a pfSense VM that handles VPN access for
employees to connect to the internal network.
- The server has reached its capacity, and I need to add a new server
to scale my infrastructure.
What I Want to Achieve
- Add a New Server: I want to install Proxmox on a new server and join
it to the existing server to form a cluster.
- VM Communication: After joining the cluster, I want VMs on the new
server to be able to communicate with VMs on the old server.
- Employee VPN Access: Employees should be able to access VMs on the
new server via the existing pfSense VPN.
Questions
- **Cluster Setup:** Are there any specific considerations when joining the new server to the existing cluster to ensure seamless VM
communication?
- **pfSense and VPN:** Do I need to make any changes to pfSense (e.g., firewall rules, routing) to allow VPN access to VMs on the new
server?
Zakaria Ait Yakoub
(11 rep)
Feb 18, 2025, 08:06 PM
15
votes
3
answers
109574
views
rsync error: some files/attrs were not transferred
I'm trying to move my emails `Maildir` from an old CentOS server to a new Debian server. rsync -avz /home/me/Maildir ssh root@ipaddress:/var/vmail/me/Maildir I tried to copy a 8GB account, didn't work, try to move another about 20mb, didn't work, tried to use `-avn`, didn't work either. sync error:...
I'm trying to move my emails
Maildir
from an old CentOS server to a new Debian server.
rsync -avz /home/me/Maildir ssh root@ipaddress:/var/vmail/me/Maildir
I tried to copy a 8GB account, didn't work, try to move another about 20mb, didn't work, tried to use -avn
, didn't work either.
sync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
Lynob
(4434 rep)
Apr 13, 2013, 01:15 AM
• Last activity: Nov 19, 2024, 12:13 PM
0
votes
0
answers
865
views
Failing to upgrade Oracle Linux 7.9 to 8.10 via leapp
Leapp upgrade of Oracle Linux 7.9 to 8.10 fails and drops in emergency mode. This happens when I select EL8 kernel in grub menu. System seems to be working normally with EL7 kernel. Systems are virtualized in VMWare. While entering into emergency mode, this message appears: Warning: /dev/disk/by-uui...
Leapp upgrade of Oracle Linux 7.9 to 8.10 fails and drops in emergency mode. This happens when I select EL8 kernel in grub menu. System seems to be working normally with EL7 kernel. Systems are virtualized in VMWare.
While entering into emergency mode, this message appears:
Warning: /dev/disk/by-uuid/XXXXX-XXXX-XXXXX-XXXX-XXXXX does not exist
I tried to use /dev/sda3 instead, but it fails with same message, only it complains about
/dev/sda3
missing.
leapp preupgrade generated report has no inhibitors, but what puzzles me are these two high factor messages:
Risk Factor: high Title: Leapp detected loaded kernel drivers which are no longer maintained in OL 8. Summary: The following OL 7 device drivers are no longer maintained OL 8:
- mptbase
- mptscsih
- mptspi
Key: d3dc36baebfba8ca1c73bbc031f4c8fa07bcfd6f
----------------------------------------
Risk Factor: high Title: GRUB core will be updated during upgrade Summary: On legacy (BIOS) systems, GRUB core (located in the gap between the MBR and the first partition) does not get automatically updated when GRUB is upgraded. Key: baa75fad370c42fd037481909201cde9495dacf4
----------------------------------------
I somehow suspect the three modules to be the problem.
On the other hand, when I run clean OL8 instance, install the kernel-modules package and load the modules, it works. Even when I add them into /etc/modules-load.d/
so they are loaded at boot.
Do you have any ideas how to fix this?
Tried to unload the modules and regenerate initramfs, still fails.
user22786923
(1 rep)
Sep 27, 2024, 01:46 PM
1
votes
1
answers
283
views
How to migrate my encrypted passwords to my new laptop
I'm using `pass` to store my password. Passwords are stored in `~/.password-store`. This has been working for 10 years, but now I have a new laptop. I'm trying to migrate the passwords by copying what I think is required, but it does not work. I copied the following directories to my new computer. -...
I'm using
pass
to store my password. Passwords are stored in ~/.password-store
. This has been working for 10 years, but now I have a new laptop. I'm trying to migrate the passwords by copying what I think is required, but it does not work.
I copied the following directories to my new computer.
- ~/.password-store
- ~/.ssh
- ~/.gnupg
Notice that I copied .ssh
to get access to my GitHub repo. It is probably not related to pass
but honestly I don't know. This approach does not work and pass
tells me that there is no private key.
I tried to follow the “Migrating Linux Pass
to a New Machine” tutorial ,
but I was not able to figure out what to do at:
gpg --output private.pgp --armor --export-secret-key username@example
I don't know where private.pgp
is supposed to be,
and I don't know what username@example
is supposed to be
on my computer.
Alternative question: which files am I supposed to store in a safe place, in order to recover all my password in case my SDD would be irrecoverable?
I've been praying for 10 years now for my SSD to not fail,
because if it does, I'll lose access to EVERYTHING.
So far I prayed strong enough. :-)
JRR
(121 rep)
Feb 3, 2024, 08:16 PM
• Last activity: Feb 4, 2024, 01:39 PM
0
votes
1
answers
415
views
ZFS: Best Practices for Restructuring multiple pools with encrypted datasets at once
## High Level Description ## So I currently have a convoluted ZFS setup and want to restructure it, reusing some of the existing hardware. I know that the recommended way of doing something like this is to backup all data, destroy the old pools, create the new ones and restore the data, the question...
## High Level Description ##
So I currently have a convoluted ZFS setup and want to restructure it, reusing some of the existing hardware.
I know that the recommended way of doing something like this is to backup all data, destroy the old pools, create the new ones and restore the data, the question is on *how* to best do this
## The Setup and Details ##
My current setup consists of 3×1TB and 3×4TB drives set up in the following way
Two of the 4TB drives are each formatted in one 1TB and one 3TB Partition.
*
media_pool
is a raidz1 pool consisting of 5×1TB disks/ partitions (-> 4TB Avaiable, 3.26TB used)
* three_t_pool
is a mirror consisting of the 2 3TB partitions (-> 3TB Avaiable, 1.93TB used)
* non_redundant
is a pool just consisting of one 4TB drive (1.07TB used)
Each of those pools has exactly one encrypted dataset spanning the entire pool.
media_pool/media_encrypted
, three_t_pool/backups
, and non_redundant/nr_encrypted
.
----------
My future setup will retire the 1TB drives and add a 12TB drive as follows:
* media_and_backups
a raidz1 pool consisting of the 3 4TB drives and a 4TB partition of the 12TB drive ((4-1)×4TB = 12TB avaiable)
* non_redundant_foo
the remaining 8TB of the big drive.
And encrypted datasets
media_and_backups/media_encrypted
, media_and_backups/backups
, and non_redundant_foo/nr_encrypted
.
(Although keeping the media and backup datasets separate is not a must if this would complicate things)
----------
Now my migration process would probably look like this (With all 7 drives connected to the same machine):
* Format the 12TB drive in the desired 4 and 8TB partitions
* backup the data of the exiting pools/datasets to the 8TB partition
* destroy the old three pools, create the media_and_backups
pool and corresponding datasets (media_and_backups/media_encrypted
, media_and_backups/backups
), restore them from backup
* [Optionally even move the nr_encrypted
data to media_and_backups
, destroy the filesystem on the 8TB partition create a new pool there and restore the nr_encrypted
dataset to there]
But like I mentioned above the part where I'm unsure about is the backup and restore progress
* One naïve method I can think of is to just use rsync, create a folder for each dataset, sync-in all the data, create the pools and datasets I desire and rsync back to those.
* One obvious disadvantage would be that the data would be decrypted on backup and reencrypted on restore
* It just feels *wrong* how would I for example recognize in-transfer data corruption
* zfs send
and zfs receive
seems to be the way to go. But... how would I actually do that?
* I read the answer to https://unix.stackexchange.com/questions/680235/zfs-send-recv-full-snapshot but there are some key differences between my setup and theirs:
* They directly create the new pool on the new server I want to first store the backup and then later restore it on the same server
* I have three datasets from three different pools i want to store on the same pool
* Also there's the thing about the available storage: the 8TB (= 7.28TiB) should be enough to hold the 3.26+1.93+1.07=6.26TiB of used data, but of course a 8TB pool would not be able to host 4+3+4TB worth of datasets
* So I think I should zfs send
the current datasets into one big file each (or somehow split those into blocks) on the 8TB pool, then when that's done destroy the old pools and create the new ones and zfs recv
from the files to the pools
Is this the best way of doing this, or is there a better/ recommened way?
Or any best practicies for using zfs send
/ zfs receive
.
If I do it this way are there any caveats to watch out for?
frieder
(1 rep)
Dec 9, 2023, 09:49 PM
• Last activity: Dec 13, 2023, 07:13 PM
0
votes
0
answers
158
views
Unmount root from /boot partition? trying to fstransform /dev/mapper/VolGroup-lv_root
I am trying to transform `/dev/mapper/VolGroup-lv_root` from xfs to ext4 using fstransform on my CentOS 7 VM. This is needed for a migration from another Centos 7 VM. The issue I am facing is the root filesystem type does not match between the VMs. `mount` shows `/dev/mapper/VolGroup-lv_root` as the...
I am trying to transform
/dev/mapper/VolGroup-lv_root
from xfs to ext4 using fstransform on my CentOS 7 VM. This is needed for a migration from another Centos 7 VM. The issue I am facing is the root filesystem type does not match between the VMs. mount
shows /dev/mapper/VolGroup-lv_root
as the mounted root directory:
/dev/mapper/VolGroup-lv_root on / type xfs (rw,relatime,attr2,inode64,noquota)
The transformation fails with fsmove: ERROR: failed to remove source directory '//boot': Device or resource busy
.
Some other maybe helpful info:
ls -l /dev/mapper/VolGroup-lv_root
rwxrwxrwx 1 root root 7 Aug 30 14:19 /dev/mapper/VolGroup-lv_root -> ../dm-0
ls -l /dev/dm-0
brw-rw---- 1 root disk 253, 0 Aug 30 14:19 /dev/dm-0
Tristan Kosciuch
(1 rep)
Aug 30, 2023, 02:45 PM
• Last activity: Aug 30, 2023, 02:47 PM
7
votes
1
answers
3374
views
Migration of a working Debian 11 system to another
Assume I have two Debian 11 systems. System A with custom application setup. etc. And a vanilla system B. Now I would like to transfer the whole setup from A to B. I found some links, where users tried to [transfer the whole root][1] tree or [clone their system][2] to another drive. The main effort...
Assume I have two Debian 11 systems. System A with custom application setup. etc. And a vanilla system B. Now I would like to transfer the whole setup from A to B. I found some links, where users tried to transfer the whole root tree or clone their system to another drive. The main effort in this solutions are to re-install grub and adjust some crucial configuration files like
fstab
. Can I just exclude those directories, which contain crucial configurations files like /boot
and /etc/fstab
from copy/tar?
Or is there a tool that allows me make a backup of system A and create a boot able usb pen drive using this backup?
Murmulodi
(1226 rep)
Mar 22, 2023, 01:53 PM
• Last activity: Apr 2, 2023, 01:00 PM
0
votes
0
answers
330
views
How to backup VM from bhyve and migrate it to KVM?
I am stuck here and can not find information about migrating Windows and Linux/Unix vm's to KVM. Doing it with zfs is inefficient, because it will transfer the whole disk space, which can be more than 200GB. Making a copy of the directories in Linux/Unix machines kind of worked, but I don't think th...
I am stuck here and can not find information about migrating Windows and Linux/Unix vm's to KVM. Doing it with zfs is inefficient, because it will transfer the whole disk space, which can be more than 200GB.
Making a copy of the directories in Linux/Unix machines kind of worked, but I don't think that's the right way.
cp -R /etc
cp -R /home/user
And send those copies to the KVM machine.
For the Linux part was basically that. I needed mainly installed services and their configs. If there is a way to copy the entire VM and spin it up on KVM good, I am open.
Creating a backup of Windows Server does not work also, because it creates vhdx files and converting them to qcow2 seems to break them, or I just don't do it right.
I use the Backup service and add the whole system backup zip to a network share. Basically that's it and I am stuck how it can but used to spin up new Windows VM on KVM.
Can someone give me guidance here?
Baequiraheal
(11 rep)
Dec 14, 2022, 11:59 AM
• Last activity: Dec 14, 2022, 12:58 PM
75
votes
5
answers
117720
views
Moving Linux install to a new computer
I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on Linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle? Obviously, xo...
I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on Linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle?
Obviously, xorg configs would change and proprietary ATI drivers and such would have to be recompiled (maybe?). Is there more to it than I'm thinking of?
Assume the two computers are from the same era, e.g. both i7s but slightly different hardware.
Update:
Thanks for the answers. This is mostly for my own curiosity. I have my Linux system up and running at work, but eventually I'd like to move to a computer that I can get dual video cards into so I can run more than two monitors. But not any time soon.
Falmarri
(13507 rep)
Oct 7, 2010, 08:39 PM
• Last activity: Nov 16, 2022, 02:52 PM
0
votes
0
answers
23
views
Port 22 closed after migrating users
I have 2 AWS EC2 instances with RHEL 6 and 8 respectively. I followed [this procedure](https://access.redhat.com/solutions/179753) to migrate all the users from the oldest server to the new one. In the process I had to delete some lines from all the .bak files created from the procedure (because the...
I have 2 AWS EC2 instances with RHEL 6 and 8 respectively. I followed [this procedure](https://access.redhat.com/solutions/179753) to migrate all the users from the oldest server to the new one. In the process I had to delete some lines from all the .bak files created from the procedure (because they would conflict with default existing users on the new server). Another thing I had to do was changing the UID and GID for the ssm-user and ec2-user on the new server, since they conflicted with existing users on the old server and I was afraid on making changes on the old one and risk damaging something.
After all of this I rebooted the new server but couldn't access it from SSH anymore. After many tries the only difference I've found is that 22 port seems to be not open.
Results of the lsof command can be seen below
Server before migrating users
# lsof -i -P -n
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
chronyd 719 chrony 6u IPv4 20809 0t0 UDP 127.0.0.1:323
chronyd 719 chrony 7u IPv6 20810 0t0 UDP [::1]:323
NetworkMa 766 root 27u IPv4 22927 0t0 UDP :68->>67
ssm-agent 1302 root 10u IPv4 51028 0t0 TCP :41646->>443 (ESTABLISHED)
ssm-agent 1302 root 15u IPv4 28155 0t0 TCP :47220->>443 (ESTABLISHED)
sshd 10532 root 5u IPv4 48231 0t0 TCP *:22 (LISTEN)
sshd 10532 root 7u IPv6 48233 0t0 TCP *:22 (LISTEN)
Server after migrating users
# lsof -i -P -n
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
chronyd 717 chrony 6u IPv4 20118 0t0 UDP 127.0.0.1:323
chronyd 717 chrony 7u IPv6 20119 0t0 UDP [::1]:323
NetworkMa 764 root 27u IPv4 22164 0t0 UDP :68->>67
ssm-agent 1324 root 10u IPv4 29098 0t0 TCP :36630->>443 (ESTABLISHED)
ssm-agent 1324 root 15u IPv4 27154 0t0 TCP :58756->>443 (ESTABLISHED)
ssm-sessi 1449 root 16u IPv4 27463 0t0 TCP :33702->>443 (ESTABLISHED)
I'm accessing the servers without a key and I need to repeat this process at least on 8 more servers, so I would like how to solve this and how to avoid it when repeating the process on another server.
Byag
(101 rep)
Oct 4, 2022, 09:23 PM
6
votes
2
answers
6157
views
Migrate from Ubuntu to Debian and take the application data along
I am thinking of switching to Debian from Ubuntu, for various reasons, moving towards a more free software supporting system being one of them. (GNU.org mentions that we can choose to keep Debian completely free if we want, by not including the nonfree repositories.) Apart from the installation (whi...
I am thinking of switching to Debian from Ubuntu, for various reasons, moving towards a more free software supporting system being one of them. (GNU.org mentions that we can choose to keep Debian completely free if we want, by not including the nonfree repositories.)
Apart from the installation (which I should be able to manage since I've grown pretty comfortable with reading manuals and using the terminal), I have one major concern: my internet connection is weak, in terms of both bandwidth and usage limit. Thus, it would be inconvenient if I had to identify all the packages that I'm currently used to using and have set up on Ubuntu (such as Python3, python-pip packages, GNU Octave and its data, and basically every other package I've installed off the internet using
apt
), and download and install them all over again.
What I mean to ask is, is there any neat way of doing this? Is it possible, first of all, to take my packages from one system to another, with data? I'm specifically asking because Ubuntu is Debian-based.
If it is not possible, I am willing to download the packages (sure, it would take a long time, but I would have to do it). But in that case, once I have the packages set up on Debian, can I move just the data across the two systems? Even that would be really convenient.
axolotl
(402 rep)
Feb 12, 2017, 02:21 PM
• Last activity: Sep 22, 2022, 12:14 PM
3
votes
2
answers
273
views
Is this a safe way to migrate my data to a new computer?
I recently bought a new laptop and I would like to migrate to it with as little hassle as possible. I don't want to do a fresh install since I have made various tweaks to my current setup for things like automounting remote drives from my NAS, configuring networking etc. that I would prefer not to h...
I recently bought a new laptop and I would like to migrate to it with as little hassle as possible. I don't want to do a fresh install since I have made various tweaks to my current setup for things like automounting remote drives from my NAS, configuring networking etc. that I would prefer not to have to redo.
My current thinking is that I can just dump the contents of my hard drive to a file, then
cat
that file onto the new drive. The general idea will be:
1. On the old computer, cat the drive into a file on an external USB disk and (as root):
# cat /dev/sda > /mnt/externalUsb/sda.img
2. I then boot into a live system on the new computer, connect the external drive and (as root):
# cat /mnt/externalUsb/sda.img | sudo tee /dev/sda
3. Shut down the live session, reboot the machine and, I hope, find myself in a working system which is a perfect clone of my old machine.
Or, perhaps more realistically, something like:
1. Create the partitions I want on the new machine, making sure they are larger than the equivalent ones on my old machine.
2. On the old computer, cat the partitions into files on an external USB disk (as root):
for i in 5 6; do cat /dev/sda"$i" > /mnt/externalUsb/sda"$i".img; done
3. On the new machine, after making sure the numbers are the same or modifying the command accordingly:
for i in 5 6; do cat /mnt/externalUsb/sda"$i".img; > /dev/sda"$i"; done
Some relevant notes:
* The hardware of the old and new machines is relatively similar as I will be moving from a ThinkPad T460P to a ThinkPad P14s Gen 2 .
* The new machine has a 1TB hard drive but the old one is only 512G.
* I am using Arch, dual booted with a Windows 10. I am not particularly bothered about keeping the Windows install.
My current machine's disk setup:
$ sudo parted -l
Model: ATA SAMSUNG MZ7LN512 (scsi)
Disk /dev/sda: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, hidden, esp
2 274MB 290MB 16.8MB Microsoft reserved partition msftres
3 290MB 86.4GB 86.1GB ntfs Basic data partition msftdata
5 86.4GB 136GB 50.0GB ext4
6 136GB 437GB 301GB ext4
9 437GB 485GB 47.3GB ntfs msftdata
8 485GB 495GB 10.5GB ext4
7 495GB 511GB 16.1GB linux-swap(v1) swap
4 511GB 512GB 1049MB ntfs Basic data partition hidden, diag
I am expecting the kernel to detect the new/different hardware the first time it boots and sort it out for me automatically. Am I missing something obvious here? Any specific problems I might encounter? The new drive is larger, so that shouldn't be a problem, right? I have an ecryptfs-encrypted directory (two of them, actually), am I right in assuming that won't be an issue? Will I need to do anything special to handle the EFI system partition perhaps?
-----
I accepted MC68020's helpful answer, but I ended up taking a different approach: I booted a live system, created the root and /home
partitions and then just copied all my files over using rsync
as described in the Arch Wiki .
I managed to boot the "new" system, but it still needs some tweaks, notably for the graphics driver. This isn't an approach to be taken if you don't know your way around Linux and enjoy tinkering. Of course, if you don't enjoy it, it's unlikely you'll be using Arch.
terdon
(251585 rep)
Jun 26, 2022, 04:20 PM
• Last activity: Jul 17, 2022, 07:48 PM
0
votes
0
answers
413
views
Mounting Entire Container into a Directory
I am trying to mount my entire docker debian container into /home/admin/main directory of my vps as a backup and migration solution but I get an error. *Command Used* ```bash sudo docker run -ditv /home/admin/main:/ debian /bin/bash ``` *Error Received* ```bash docker: Error response from daemon: in...
I am trying to mount my entire docker debian container into /home/admin/main directory of my vps as a backup and migration solution but I get an error.
*Command Used*
sudo docker run -ditv /home/admin/main:/ debian /bin/bash
*Error Received*
docker: Error response from daemon: invalid volume specification: '/home/admin/main:/': invalid mount config for type "bind": invalid specification: destination can't be '/'. See 'docker run --help'.
Thanks for your help in advance
zakadmin
(63 rep)
Jul 4, 2022, 07:53 PM
0
votes
0
answers
19
views
Categorizing Debian Linux VPS
I like to Categorize or Divide one Debian VPS for different Tasks and Testing. For Example two Apache Web Servers with no any connection between both. Something like installing apache2 web server only to user A and the user B can't even watch or check the user A apache webserver without access while...
I like to Categorize or Divide one Debian VPS for different Tasks and Testing.
For Example two Apache Web Servers with no any connection between both. Something like installing apache2 web server only to user A and the user B can't even watch or check the user A apache webserver without access while user B can run a seperate apache server.
The purpose for this is in case I want to migrate user A Web Server and Configurations to new seperate vps without any hindrance to user B data, databases and configuration, securely.
I think my requirements are clear.
Eventhough, I just said I want divide maintain migrate user seperately, I don't how to do any of them. I am just new to linux and I think I can get a detailed answer on my question.
Thanks in Advance
zakadmin
(63 rep)
Jun 22, 2022, 08:13 PM
6
votes
2
answers
2411
views
Migrating away from apt-key adv
I have quite some scripts that are still using the `apt-key adv` command. And I know this command is deprecated. And soon becoming unable to use. Correct me if I'm wrong, but Debian 11 is the last Debian version supporting `apt-key`. I also know we need to migrate to fetching the .asc file directly...
I have quite some scripts that are still using the
apt-key adv
command. And I know this command is deprecated. And soon becoming unable to use.
Correct me if I'm wrong, but Debian 11 is the last Debian version supporting apt-key
.
I also know we need to migrate to fetching the .asc file directly and put the file into the /etc/apt/trusted.gpg.d/
folder.
How do I convert from the command below to a wget of this .asc file? Where can I find the .asc files I need? Are those .asc files even provided by Linux Mint / X2Go or other repos?
The command I use for downloading keys at the moment is:
First example: apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A6616109451BBBF2
Second example: apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E1F958385BFE2B6E
How do I retrieve the .asc
(or .gpg
) files from those repos?
Melroy van den Berg
(201 rep)
Dec 17, 2021, 10:32 PM
• Last activity: May 12, 2022, 11:19 AM
-1
votes
3
answers
1231
views
How to get comfortable in linux as an ex-windows user?
I've been using linux full time for about 8 years. Now and then I help someone else migrate from windows to linux. Because I don't often use windows, I often find myself forgetting some of the differences between the operating systems. I would like a guide that I can give to such users, to help them...
I've been using linux full time for about 8 years. Now and then I help someone else migrate from windows to linux. Because I don't often use windows, I often find myself forgetting some of the differences between the operating systems.
I would like a guide that I can give to such users, to help them get more comfortable with using linux. The guide should include things like the drive mounting systems (
C:\bar\
vs. /foo/bar/
), and software installation.
There are lots of guides out there called "migrating/moving from windows to linux" or similar, but nearly all of them seem to be full of linux propaganda, or installation instructions. That's fine for other purposes, but I want a guide for someone who has already decided to move, (e.g. because they like the concept of open source), and for whom the system has already been installed. So a post-install "I've moved from windows to linux, now what?" kind of guide that covers *practical* differences (i.e. not philosophical or highly technical) that an average windows user (Someone who uses a computer for websurfing, document editing, movie watching, game playing, etc.) might encounter. Do any such guides exist?
naught101
(779 rep)
Jan 27, 2013, 06:06 AM
• Last activity: Jan 19, 2022, 03:27 PM
0
votes
0
answers
372
views
Migrating user IMAP files/data to another hard drive/server
Due to a machine crash, I need to move my mail server to another host. This includes user IMAP, but as the old server is not accessible I can't just drag and drop in an imap client application like Thunderbird. Rather, I have the old hard drive, and am trying to move the file structure to the new /h...
Due to a machine crash, I need to move my mail server to another host. This includes user IMAP, but as the old server is not accessible I can't just drag and drop in an imap client application like Thunderbird. Rather, I have the old hard drive, and am trying to move the file structure to the new /home partition. I have not yet had success.
I have copied (
cp -pr
) the old file structure wholesale onto the new server/drive. However, the imap client isn't recognizing the old folder structure or the old messages anywhere but the inbox. The file structure has a '~mail' directory under ~home, and in that are the folders containing the email. What do I need to copy, and where, to ensure that the users can access their imap data on the new server? Running CentOS 8 with Sendmail and Dovecot.
[spamtrap_003@davinci ~mail]$ ls -la
total 90496
drwxr-xr-x. 4 spamtrap_003 spamtrap_003 4096 Dec 8 14:05 .
drwx------. 6 spamtrap_003 spamtrap_003 213 Dec 8 11:46 ..
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 562 Apr 5 2013 Carolingia
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 620 Jun 8 2014 'Deleted Messages'
-rw-r--r--. 1 spamtrap_003 spamtrap_003 580 Dec 8 14:05 dovecot.list.index.log
-rw-r--r--. 1 spamtrap_003 spamtrap_003 24 Dec 8 14:05 dovecot.mailbox.log
-rw-r--r--. 1 spamtrap_003 spamtrap_003 8 Dec 8 14:05 dovecot-uidvalidity
-r--r--r--. 1 spamtrap_003 spamtrap_003 0 Dec 8 14:05 dovecot-uidvalidity.61b101e2
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 6672436 May 25 2021 Drafts
-rw-r--r--. 1 spamtrap_003 spamtrap_003 6902202 May 24 2021 Fitbit
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 639800 Dec 8 12:45 ham
drwxrwxrwx. 20 spamtrap_003 spamtrap_003 4096 Dec 8 14:06 .imap
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 149895 Nov 20 2014 PSL.iPad
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 28823 Jan 21 2013 Rayburn
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 195356 Sep 10 2014 RenStore
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 6245982 May 25 2021 Sent
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 45228 Oct 12 2015 'Sent Messages'
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 71725052 Aug 17 08:51 spam
-rw-r--r--. 1 spamtrap_003 spamtrap_003 102 Apr 9 2021 .subscriptions
-rw-r--r--. 1 spamtrap_003 spamtrap_003 11 Dec 8 14:05 subscriptions
drwxr-xr-x. 6 spamtrap_003 spamtrap_003 121 Dec 8 14:06 .Trash
-rwxrwxrwx. 1 spamtrap_003 spamtrap_003 603 Apr 13 2021 Trash
The .imap
subdirectory shows as follows:
[spamtrap_003@davinci .imap]$ ls -la
total 28
drwxrwxrwx. 20 spamtrap_003 spamtrap_003 4096 Dec 8 14:06 .
drwxr-xr-x. 4 spamtrap_003 spamtrap_003 4096 Dec 8 14:05 ..
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Mar 26 2019 Carolingia
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 6 Dec 8 14:05 cur
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Mar 26 2019 'Deleted Messages'
-rw-rw-rw-. 1 spamtrap_003 spamtrap_003 40 Dec 8 14:05 dovecot.index.log
-rw-rw-rw-. 1 spamtrap_003 spamtrap_003 3748 Dec 8 14:06 dovecot.list.index.log
-rw-r--r--. 1 spamtrap_003 spamtrap_003 24 Apr 9 2021 dovecot.mailbox.log
-rw-rw-rw-. 1 spamtrap_003 spamtrap_003 51 Dec 8 14:05 dovecot-uidlist
-rw-r--r--. 1 spamtrap_003 spamtrap_003 8 Apr 9 2021 dovecot-uidvalidity
-r--r--r--. 1 spamtrap_003 spamtrap_003 0 Apr 9 2021 dovecot-uidvalidity.607089eb
drwxr-xr-x. 2 spamtrap_003 spamtrap_003 31 Dec 8 14:06 dovecot-uidvalidity.61b101e2
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 May 3 2021 Drafts
drwxr-xr-x. 2 spamtrap_003 spamtrap_003 58 Apr 9 2021 Fitbit
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Apr 11 2021 ham
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Aug 25 17:08 INBOX
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 6 Dec 8 14:05 new
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Mar 26 2019 PSL.iPad
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Mar 26 2019 Rayburn
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Mar 26 2019 RenStore
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Aug 26 08:11 Sent
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Mar 26 2019 'Sent Messages'
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Aug 17 08:40 spam
drwxr-xr-x. 2 spamtrap_003 spamtrap_003 31 Dec 8 14:06 subscriptions
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 6 Dec 8 14:05 tmp
drwxrwxrwx. 2 spamtrap_003 spamtrap_003 79 Jul 5 22:30 Trash
Could it be the *permissions* on the Dovecot index files?
The old and new both use Dovecot. I don't have the version for the old one; when it was running it had CentOS 7, fairly well updated. The new one is 2.3.8. The configuration for storage and mail folder type should be the same: {mail_location = mbox:~/~mail:INBOX=/var/spool/mail/%u} The new and old users are not necessarily the same (UID and GID), though the names match. I have, for one box, changed the owner for all files in and under $HOME/~mail to be owned by that user, to no avail.
EDIT 13Dec21:
I have determined that it is NOT a permissions/ownership problem. I was able to create a new folder via my imap client (Thunderbird), and it showed properly. I then examined the ownership and permissions of the created files and directories and duplicated them in an existing folder. This did not work; the folder still wouldn't show. Next is examining and possibly doing surgery to the actual dovecot index files that are created, since clearly it's not like I'm going to lose anything more.
But wait. there's more. After collapsing and reopening the account's folder tree in Thunderbird, the new folder is no longer visible. Needless to say, neither are any old ones. I cannot discern why one account shows properly and the rest don't.
Don Levey
(1 rep)
Dec 8, 2021, 05:04 PM
• Last activity: Dec 13, 2021, 03:01 PM
Showing page 1 of 20 total questions