[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transferring boot



Eben King (HE12025-07-31):
> eben@cerberus:~$ lsblk
> NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
> sda       8:0    0 238.5G  0 disk
> └─sda1    8:1    0 238.5G  0 part
> sdb       8:16   0   1.8T  0 disk
> ├─sdb1    8:17   0   953M  0 part /boot
> ├─sdb2    8:18   0     2G  0 part /
> ├─sdb3    8:19   0    20G  0 part /usr
> ├─sdb5    8:21   0   953M  0 part
> ├─sdb6    8:22   0   300G  0 part
> ├─sdb7    8:23   0    30G  0 part /misc/export
> ├─sdb8    8:24   0   130G  0 part /misc/media
> ├─sdb9    8:25   0   165G  0 part /misc/mp3
> ├─sdb10   8:26   0    74G  0 part /misc/torrent
> ├─sdb11   8:27   0     9G  0 part /home
> ├─sdb12   8:28   0    75G  0 part /misc/scratch
> └─sdb13   8:29   0    48G  0 part [SWAP]
> sdc       8:32   0 238.5G  0 disk
> ├─sdc1    8:33   0   5.1G  0 part /var/cache
> └─sdc2    8:34   0 182.7G  0 part /misc/iso
> sdd       8:48   1     0B  0 disk
> sr0      11:0    1   7.5G  0 rom
> 0
> eben@cerberus:~$ df
> Filesystem          1K-blocks      Used  Available Use% Mounted on
> udev                 16132328         0   16132328   0% /dev
> tmpfs                 3229464      1796    3227668   1% /run
> /dev/sdb2             2047208    802856    1123116  42% /
> /dev/sdb3            20557912   8146532   11439652  42% /usr
> tmpfs                16147316     71380   16075936   1% /dev/shm
> tmpfs                    5120        16       5104   1% /run/lock
> /dev/sdc1             5157164   1373336    3501616  29% /var/cache
> /dev/sdc2           187459092  79418636   98445320  45% /misc/iso
> /dev/sdb7            30786644  19419460    9777988  67% /misc/export
> /dev/sdb1              941740    132468     744096  16% /boot
> /dev/sdb8           133589828 122712680    4045076  97% /misc/media
> /dev/sdb12           76832012  43023296   29860172  60% /misc/scratch
> /dev/sdb9           169191044 156127788    4396124  98% /misc/mp3
> /dev/sdb10           75799884  46825720   25078052  66% /misc/torrent
> /dev/sdb11            9278492   7747788    1042472  89% /home
> tmpfs                 3229460      2484    3226976   1% /run/user/1000

Not everything will fit, you will have to choose what you want to move.

It is a good occasion to fix choices that are no longer relevant: for
example, splitting /usr from the root filesystem has not been useful for
a long time.

(Yet I do it, because I use the same /usr volume on multiple VMs,
mounted read-only: that saves spaces while letting me install useful
things.)

On the other hand, /var on the same filesystem as the rest of / is not a
good idea.

I strongly recommend you take it by step.

First, get the bootloader working. You need to create a EFI system
partition. For just Linux it can be quite small, but some people
reported firmware using it to write firmware updates, so…

You need to boot in UEFI to install the bootloader in UEFI. Yeah, that's
braindead, welcome to industrial standards. You can use any live system.
You can just use the bootloader of the live system, have it source the
config file of your installer bootloader and get your usual system
booted. Otherwise, you will need to mount your system, mount the special
directories and chroot.

Once you manage to get your system booting from the new SSD in UEFI, you
can do the next step: copying what you need to copy.

It is a very good idea to use LVM: just create a big partition on the
rest of the disk and use it as a big PV.

Create the logical volumes or the partitions you want, create the
filesystems on them, and then mount them in some directory, maybe /mnt,
with the same tree structure they will need, creating the mount points
as you go. I.e.:

mount /dev/mapper/ssd-root /mnt
mkdir /mnt/var
mount /dev/mapper/ssd-var /mnt/var
…

Once it is done, you can use cp -a to copy the data from the HD to the
SSD. You can do all that from your running system, except the /var tree
(and even that…). I would recommend logging out from any desktop
environment though: either work in text console or from a lightweight
X11 setup.

Last step: since you want to use a different /root, reinstall the
bootloader.

Good luck, and do not forget to take notes of all you do at each step.

> sda is the new SSD.  sdb is my HD.  sdc is another SSD.  nascent is a NAS.
> No idea what sdd is:
> 
> eben@cerberus:~$ sudo fdisk -l /dev/sdd
> fdisk: cannot open /dev/sdd: No medium found

Almost certainly a card reader, but it is surprising you do not know and
did not take steps to.

Regards,

-- 
  Nicolas George


Reply to: