tips:ubuntu:zfs-on-root

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips:ubuntu:zfs-on-root [2017/01/18 16:14] – [Complete system] scipiotips:ubuntu:zfs-on-root [2018/03/09 10:57] (current) nicola
Line 26: Line 26:
 <code> <code>
 DISK=/dev/disk/by-id/ata-HFS512G39MND-3510A_FJ64N5235113A4S13 DISK=/dev/disk/by-id/ata-HFS512G39MND-3510A_FJ64N5235113A4S13
-sgdisk --clear $DISK+sgdisk --clear -g $DISK
 </code> </code>
  
Line 34: Line 34:
 sgdisk -a1 -n2:34:2047  -t2:EF02 $DISK sgdisk -a1 -n2:34:2047  -t2:EF02 $DISK
  
-# Run this for UEFI booting (for use now or in the future):+# Run this for UEFI booting or raidz pool:
 sgdisk     -n3:1M:+512M -t3:EF00 $DISK sgdisk     -n3:1M:+512M -t3:EF00 $DISK
 +parted $DISK set 3 bios_grub on # needed for embedding grub in this partition 
  
 # and after run these: # and after run these:
Line 54: Line 55:
 zpool export rpool zpool export rpool
 zpool import -R /mnt rpool zpool import -R /mnt rpool
 +... umount everything inside /mnt and remove subfolders
 +zfs mount rpool/ROOT/ubuntu
 </code> </code>
  
-create raidz pool+or create raidz pool
 <code bash> <code bash>
 zpool create -O atime=off -O mountpoint=/ -R /mnt -O canmount=off -O compression=lz4 -O normalization=formD -o ashift=12 \ zpool create -O atime=off -O mountpoint=/ -R /mnt -O canmount=off -O compression=lz4 -O normalization=formD -o ashift=12 \
Line 91: Line 94:
 <code> <code>
 DISTRO=xenial DISTRO=xenial
 +mount -o remount,dev /mnt
 debootstrap $DISTRO /mnt debootstrap $DISTRO /mnt
  
Line 183: Line 187:
  
 </code> </code>
 +
 +=== manual grub menu ===
 +
 +<file txt /etc/grub.d/40_custom>
 +#!/bin/sh
 +exec tail -n +3 $0
 +# This file provides an easy way to add custom menu entries.  Simply type the
 +# menu entries you want to add after this comment.  Be careful not to change
 +# the 'exec tail' line above.
 +
 +menuentry 'Ubuntu artful 17.10' {
 + recordfail
 + load_video
 + gfxmode $linux_gfx_mode
 + insmod gzio
 + insmod part_gpt
 + insmod zfs
 + set root='hd1,gpt0'
 + search --no-floppy --fs-uuid --set=root 3f1e7de17907507c
 +        linux /ROOT/artful@/boot/vmlinuz-4.13.0-16-generic root=ZFS=rpool/ROOT/artful ro 
 + initrd /ROOT/artful@/boot/initrd.img-4.13.0-16-generic
 +}
 +</file>
  
  
Line 235: Line 262:
 <code> <code>
 useradd -m scipio useradd -m scipio
-usermod -a -G adm,cdrom,dip,lpadmin,plugdev,sambashare,sudo scipio+usermod -a -G adm,cdrom,dip,plugdev,sudo,video scipio
 passwd scipio passwd scipio
 </code> </code>
Line 246: Line 273:
 ubuntu desktop ubuntu desktop
 <code bash> <code bash>
-apt install --yes ubuntu-desktop+apt-get install -y software-properties-common 
 +add-apt-repository ppa:gnome3-team/gnome3-staging 
 +sudo apt install -y ubuntu-gnome-desktop 
 +#apt install --yes ubuntu-desktop 
 +apt-get -y install $(check-language-support -l it) 
 + 
 +# HWE support for XENIAL 
 +sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04 
 +</code> 
 + 
 +enable network manager on all interfaces (see [[https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1638842|this]] 
 +<code> 
 +touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
 </code> </code>
  
-disable comression on logs+disable compression on logs
 <code> <code>
 for file in /etc/logrotate.d/* ; do for file in /etc/logrotate.d/* ; do
  • tips/ubuntu/zfs-on-root.1484752465.txt.gz
  • Last modified: 2017/01/18 16:14
  • by scipio