You are not logged in.
I'am going on a vacation and don't wanna miss my already fully optimized OS (which took my days to achieve).
Is it possible to mirror this to my laptop?
Last edited by Leandros (2012-12-23 22:04:53)
Offline
There are various approaches depending on a number of factors.:
1) Are the harddrives the same size? If so you could `dd` the entire disk onto the other and you'd be set aside from issue number 2. If the laptop drive is larger than the desktop you can still do this, but you won't be able to use any of the larger drive space. If the laptop drive is smaller, you cannot use `dd`. In this case rync would do.
2) Do the two computers have identical hardware? Probably not. They may need different drivers for video, ethernet, and wireless to name a few.
All in all, though, once you know how you want it set up it should not take more than 15-20 minutes to get a new installation set up. Copying over a few configs is easy enought (eg bashrc, xresources, vimrc).
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
All in all, though, once you know how you want it set up it should not take more than 15-20 minutes to get a new installation set up. Copying over a few configs is easy enought (eg bashrc, xresources, vimrc).
Everything is modded, from my Awesome WM to themed terminal emulator, different bash, even my keyboard layout isn't a standard one (bone2).
Basically the only way to achieve this is to do a new installation (which is easy) and copy over everything?
I need a list of all my installed packages (how to get, it seems pacman can't do it natively and paclist is only for one repo), also I need every .xx file in my home directory. Am I missing something?
Offline
Basically the only way to achieve this is to do a new installation (which is easy) and copy over everything?
No, that's not what Trilby said. A new install is one way, but he also said you could use "dd" if the hard drives are the same size, and rsync if they are not, but you may have problems if the hardware is not identical. You may also have only minor problems that are easily solved by installing the appropriate driver or by editing a few files. This wiki topic has more information: https://wiki.archlinux.org/index.php/Mi … w_hardware
Last edited by 2ManyDogs (2012-12-23 23:10:41)
Offline
No, that's not what Trilby said. A new install is one way, but he also said you could use "dd" if the hard drives are the same size, and rsync if they are not, but you may have problems if the hardware is not identical. This wiki topic has more information: https://wiki.archlinux.org/index.php/Mi … w_hardware
Ok, my concern about the method with rsync is, will it be bootable? The hardware is different.
Offline
In the pacman tips section of the wiki, there is a section on backing up and retrieving a list of user installed packages: https://wiki.archlinux.org/index.php/Pa … d_packages.
"Think for yourself and question authority." -T. Leary
Offline
I did this very thing with two laptops. I dd'ed the installation I had on my Acer 1410 to a Thinkpad X200s, even though drive sizes were different, the Thinkpad's had more capacity - I just resized partitions with leftover space with gparted later on.
Almost everything worked out of the box, it even booted into X without any changes. I just had to change a few modules here and there, install some specific software for the Thinkpad's hardware and was good to go. I did it for science.
I had wanted to try something like that for some time, to see how it would work out, and am typing this from that very installation - which, in theory is about to reach 3 years of age. I could just have done a fresh install, but the time I take configuring things to my liking, installing software - even with a few scripts I wrote to make it easier - would take much longer than what dd and subsequent cleanup took me.
Offline
The HDD on my laptop is 232 GB and the on my desktop 298 GB, ok. I guess I'll try the dd method. Is there any useful to read outthere?
I can totally erase the hdd, no important data on there.
Last edited by Leandros (2012-12-23 23:30:32)
Offline
Is there any useful to read outthere?
This wiki topic has more information: https://wiki.archlinux.org/index.php/Mi … w_hardware
You can't use "dd" if your laptop drive is smaller than your desktop. No matter how you do this, there will be some work involved to get it all working. Read the wiki.
Last edited by 2ManyDogs (2012-12-23 23:34:19)
Offline
HeHe, thanks. Does it matter I don't use the whole HDD on my desktop?
% lsblk !2849
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 100M 0 part
├─sda2 8:2 0 120G 0 part
├─sda3 8:3 0 1K 0 part
├─sda5 8:5 0 93.1G 0 part
├─sda6 8:6 0 80G 0 part /
└─sda7 8:7 0 4.9G 0 part
Offline
You still can't use dd. It does a block level copy. rsync will do the job. Read the wiki.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Just "back it up" to a different drive, or over the network.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Ok, thanks a lot. I'll try it in the next days.
Offline
Another option -- could be a good backup too...use fsarchiver. I've done this before and it works great, especially with modules typically being autoloaded.
1. Install and use fsarchiver to save your filesystems (using either savefs or savedir) to an external hard drive or flash drive. You should probably do this while booted from a live CD (like system rescue)
2. Boot the laptop with the system rescue CD and partition your drive. Nice thing about fsarchiver is the partition size doesn't have to match exactly! Use fsarchiver restorefs or restoredir to copy your system to the new machine
3. Chroot into your new installation and 'mkinincpio -p linux'. Make sure any specific drivers (aka wireless and video) are installed
4. Install the bootloader
Done (hopefully I got all the steps)
Scott
Edit: See here for some possible glitches when using 'savefs' as opposed to 'savedir'.
Last edited by firecat53 (2012-12-24 17:44:22)
Offline
I made a backup with rsync now. I realized I saved everything on a NTFS partition.
Should I redo it on a ext3 or ext4 partition?
This is the output of the rsync script:
rsync: set_acl: sys_acl_set_file(var/log/journal/3f66fdf67ade46e78452456adf947188/.user-1000.journal.jLFu9w, ACL_TYPE_ACCESS): Operation not supported (95)
sent 54396460132 bytes received 12713489 bytes 7150164.09 bytes/sec
total size is 54342332478 speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
total time: 126 minutes, 49 seconds
Offline
Yes. You should redo it using ext4 or ext3 on the target (assuming this is what you're using on the source). Otherwise you will lose information which can't be captured on NTFS and that will cause problems on the laptop.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
NTFS has no concept of file permissions or ownerships.
Use EXT4.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
NTFS has no concept of file permissions or ownerships.
Yes, I know. I noticed it after the sync was complete.
Ext4 sync is complete, too:
sent 54731623343 bytes received 12730284 bytes 15953476.21 bytes/sec
total size is 54676789214 speedup is 1.00
total time: 57 minutes, 12 seconds
How fast compared to ntfs (backup was written on an old USB 2 HDD, a WD4000AAKS).
Now just copy the backup over to my laptop?
Last edited by Leandros (2012-12-27 22:25:20)
Offline
Pretty much. Partition etc. first and then rsync to the laptop. Then make the changes you need to make to work on the laptop. At least, that's what I would probably do.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pretty much. Partition etc. first and then rsync to the laptop. Then make the changes you need to make to work on the laptop. At least, that's what I would probably do.
I partitioned it. But I wanted to just copy it over with cp. Should I do it with rsync? If yes, how?
Last edited by Leandros (2012-12-27 22:57:32)
Offline
Partition; create filesystems on partitions; rsync.
You just use the same command for rsync you used to backup. rsync -aAXv is a better option than cp (even with the -a option) because you need the file attributes to be transferred - not just the files themselves. It is no different than the backup operation except for the targets. rsync from desktop (or backup) to laptop just as you rsynced from desktop to backup. The wiki has details, as does the man page.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I recreated the grub.cfg on my laptop with grub-mkconfig -o /boot/grub/grub.cfg on a arch live cd. But grub won't boot into the new partition. It wants to boot into my old partition and I land in the grub rescue console.
set prefix=(hd1,1)/boot/grub
set root=(hd1,1)
insmod linux
insmod normal
don't work. I get a error that the insmod files are not found.
Offline
Did you install grub to disk?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Good point, maybe I should install grub again. ^_^
I thought I could just use the old grub, which is installed in my backup and only update the cfg (which I did, grub.cfg know the new OSs).
Offline
I can't install Grub again, I get an Error that Grub is not readable on boot.
If I try to boot, grub tell me: no such device: f7xxxxxxxxxxxxxxxxxxxx
If I enter set in grub rescue I get the old partitions from my desktop, although I changed the grub.cfg. Do I have to change the menu.lst?
Offline