Editing
Cloning ZFS root
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
* List partitions parted unit s p * Clone start of disk dd if=/dev/sdb bs=512 of=80gb.img count=22527 conv=nocreat,notrunc * Create loop device for partitions kpartx -a 80gb.img * Create new pool zpool create apool /dev/mapper/loop0p2 * Create snapshot on source pool zfs snapshot -r rpool@cptovm * Send to new pool zfs send -R rpool@cptovm | pv | zfs receive -Fd apool * Export new pool zpool export apool * Convert to VMWare image qemu-img convert -O vmdk ~/VirtualBox\ VMs/zolnascp/80gb.img 80gb.vmdk * Replace new image in .vmx * Use Debian ZFS LiveCD in VM to boot from image * Import apool as rpool zpool import apool rpool -R /mnt * mount grub partition mount /dev/sda1 /mnt/boot/grub * Setuo chroot env chroot /mnt mount -t sysfs sys /sys mount /proc mount /dev * Create new zpool.cache zpool set cachefile=/etc/zfs/zpool.cache rpool * set bootfs zpool set bootfs=rpool/ROOT/ubuntu-1 rpool * Update initramfs (should use new cache file) [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-to-a-Native-ZFS-Root-Filesystem] update-initramfs -c -k all update-grub grub-install /dev/sda That's it...
Summary:
Please note that all contributions to Jan's Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Jan's Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information