How to move the root partition

You’ll need to boot from a live cd. Add partitions for them to disk 1, copy all the contents over (with rsync, see rsync clone partition), and then use sudo blkid to get the UUID of each partition. On disk 1’s new /, edit the /etc/fstab to use the new UUIDs you just looked up. Updating GRUB depends on whether it’s GRUB1 or GRUB2. If GRUB1, you need to edit /boot/grub/device.map ...

August 4, 2020 · Alberto Casado

Mount devices

Mount an ssh location in local tree sshfs user@domain.com:/path mountpoint -o reconnect,password_stdin,idmap=user,ServerAliveInterval=15,umask=0002,sftp_server="/usr/lib/openssh/sftp-server -u 0002" -o reconnect: reconnect after disconnection -o ServerAliveInterval=15: keep the connection alive even if there is no activity -o idmap=user: set permissions for local user emulating remote user -o password_stdin: get password from stdin -o umask=0002,sftp_server="/usr/lib/openssh/sftp-server -u 0002": mask for existing or newly created files E.g.: sshfs casadoa1@amor.org.aalto.fi:/m/nbe/project/quantum-data/ /m/nbe/project/quantum-data/ -o reconnect,password_stdin,idmap=user,ServerAliveInterval=15,umask=0002,sftp_server="/usr/lib/openssh/sftp-server -u 0002" Unmount fusermount -u mountpoint

July 25, 2020 · Alberto Casado

USB devices

USB format (part 1) Source Well, one could try zero’ing the raw block device to see if that can work. If you can write to that then you may be able to create a clean partition table, create a new partition and format that. Suppose the USB stick is on /dev/sdc, first make sure /dev/sdc1 is unmounted: umount /dev/sdc1 See if you can then clear the partition table, say by copying a bunch of zeros over the first few K ...

July 25, 2020 · Alberto Casado