- Back up mythtv database: https://www.mythtv.org/wiki/Backend_migration
I'm using the following mounts, yours may differ:
/dev/sda
-> a large hard drive/dev/sdb
-> a temporary USB stick with the Ubuntu installer on it/dev/sdc
-> a permanent USB stick to boot from
Pre-boot:
- Enable UEFI boot in bios
- Start "Try Ubuntu" to full boot
In "Try Ubuntu":
apt-get install btrfs-tools
Start Ubuntu installer
- Select to make your own partitions
- Select /dev/sda to be btrfs, formated, mount /
- On /dev/sdc1 (USB boot stick), make first partition at least 10 MB of type "EFI Boot Partition"
- Make rest of sdc into a partition: /dev/sdc2, ext2, format, mount /boot
- Walk through installer
- Reboot, remove /dev/sdb, check that it boots correctly
apt-get update
apt-get install apt-btrfs-snapshot
apt-get ugprade
- Add second /btrfs drive:
btrfs device add /dev/sdb /
- Convert to raid1:
btrfs balance -mconvert=raid1 -dconvert=raid1 /
- Reeboot
mkdir /mnt/btrfs
mount /dev/sda /mnt/btrfs
cd !$
btrfs su sn @ @_1_installed
btrfs su sn @home @_home_1_installed
chown -R mythtv:mythtv /home/mythtv
wajig install mythtv
# set "mythtv" for mysql root and mythtv user passwords
Follow migration guide (using export UGIDLIMIT=1000
): http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/
mkdir /mnt/btrfs
mount -o defaults /dev/sda3 /mnt/btrfs
cd !$
# Setup standard Ubuntu subvolumes:
btrfs subvolume create @
btrfs subvolume create @home
# Copy old files across to btrfs:
mkdir /mnt/old
mount /dev/sdb2 /mnt/old
rsync -av --exclude 'mnt' --exclude 'home' /mnt/old/ /mnt/btrfs/@/ # After we know we can boot cp excluded
cd @/etc
# find . -name '*zfs*' # remove these files
cd /mnt/btrfs/@
for dir in dev proc sys; do mount -o bind /$dir ./$dir; done
chroot .
mount /dev/sda2 /boot
ls -l /dev/disk/by-uuid
# / was on /dev/sda3 during installation
UUID=15060261-d3a4-4c1d-840c-bce526a72e62 / btrfs defaults,subvol=@ 0 1
# /boot was on /dev/sda2 during installation
UUID=1183af99-3714-4e95-8cbc-8b20c3a9fb81 /boot ext4 defaults 0 2
apt-get update
apt-get upgrade
umount /boot
exit # chroot
cd /mnt/btrfs/@
for dir in dev proc sys; do umount ./$dir; done # get some error here
lsof proc # does it show anything for why you can't unmount...anyway...carry on.
umount /mnt/sda2
df -h
mkfs.btrfs -L btrfs_pool -m raid1 -d raid1 /dev/sda /dev/sdb
btrfs filesystem show
mkdir /mnt/btrfs_pool
mount /dev/sdb /mnt/btrfs_pool # pick any dev from raid
btrfs subvolume list /mnt/btrfs_pool
btrfs filesystem df /mnt/btrfs_pool # true usage numbers
df -h # false usage numbers?
umount /mnt/btrfs_pool
Install using Ubuntu installer (do not format, pick one dev or raid1 as / mount point)
mint ~ # btrfs subvolume list /mnt/btrfs_pool
ID 258 gen 26 top level 5 path @
ID 259 gen 21 top level 5 path @home
mint ~ # btrfs subvolume create /mnt/btrfs_pool/@albums
Create subvolume '/mnt/btrfs_pool/@albums'
mint ~ # btrfs subvolume create /mnt/btrfs_pool/@mythtv
Create subvolume '/mnt/btrfs_pool/@mythtv'
mint ~ # btrfs subvolume create /mnt/btrfs_pool/@scratch
Create subvolume '/mnt/btrfs_pool/@scratch'
mint ~ # btrfs subvolume list /mnt/btrfs_pool
ID 258 gen 26 top level 5 path @
ID 259 gen 21 top level 5 path @home
ID 263 gen 29 top level 5 path @albums
ID 264 gen 30 top level 5 path @mythtv
ID 265 gen 31 top level 5 path @scratch
mint / # umount /mnt/btrfs_pool
# Make a directory structure so it is the same as source copy:
mint / # mkdir /mnt/btrfs_compat_dirs
mint / # mount -o compress,subvol=@ /dev/sdb /mnt/btrfs_compat_dirs/
mint / # mount -o compress,subvol=@home /dev/sdb /mnt/btrfs_compat_dirs/home
mint / # mkdir /mnt/btrfs_compat_dirs/mnt/albums
mint / # mount -o subvol=@albums /dev/sdb /mnt/btrfs_compat_dirs/mnt/albums
mint / # mkdir /mnt/btrfs_compat_dirs/mnt/mythtv
mint / # mount -o subvol=@mythtv /dev/sdb /mnt/btrfs_compat_dirs/mnt/mythtv
mint / # mkdir /mnt/btrfs_compat_dirs/mnt/scratch
mint / # mount -o compress,subvol=@scratch /dev/sdb /mnt/btrfs_compat_dirs/mnt/scratch
rsync -av /path/to/sources/ /mnt/btrfs_compat_dirs/
#btrfs subvolume create /mnt/btrfs_pool/root # gets mounted to / with -o subvol=root
#btrfs subvolume create /mnt/btrfs_pool/home # gets mounted to /home with -o subvol=home
#btrfs subvolume create /mnt/btrfs_pool/mnt/albums # gets mounted to /mnt/albums with -o subvol=albums
#btrfs subvolume create /mnt/btrfs_pool/mnt/mythtv # gets mounted to /mnt/mythtv with -o subvol=mythtv
#btrfs subvolume create /mnt/btrfs_pool/mnt/scratch # gets mounted to /mnt/scratch with -o subvol=scratch
In /etc/fstab:
LABEL=btrfs_pool / btrfs defaults,compress,subvol=@ 0 0
LABEL=btrfs_pool /home btrfs defaults,compress,subvol=@home 0 0
LABEL=btrfs_pool /mnt/albums btrfs defaults,subvol=@albums 0 0
LABEL=btrfs_pool /mnt/mythtv btrfs defaults,subvol=@mythtv 0 0
LABEL=btrfs_pool /media/btrfs btrfs defaults,noauto,compress,subvolid=0 0 0
- http://chadchenault.blogspot.ca/2012/05/brother-hl-2270dw-printer-driver.html
- Set to HQ1200 DPI
- Set to NoTumble duplex
- git clone https://github.com/armooo/cloudprint
- cd cloudprint
- cp -r cloudprint /opt/
- cd /opt/cloudprint
- ./cloudprint.py -c # type in Google credentials (don't use your real Google account -- security risk)
- apt-get install python-daemon
- Add file
/etc/cron.d/cloudprint
:
# /etc/cron.d/cloudprint
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@reboot root /opt/cloudprint/cloudprint.py -d -a /root/.cloudprintauth -p /var/lib/cloudprint.pid
@hourly root /opt/cloudprint/cloudprint.py -d -a /root/.cloudprintauth -p /var/lib/cloudprint.pid
Run /opt/cloudprint/cloudprint.py -d -a /root/.cloudprintauth -p /var/lib/cloudprint.pid
and then check that cat /var/lib/cloudprint.pid
has the process ID of the running process (use ps auxf
).
Follow these instructions (http://www.mythtv.org/wiki/Backend_migration) and remember:
- Use the new mythtv database password in /etc/mythtv/config.xml (must update all frontends to use new password)
- Change the database server host from
localhost
to the computer's IP address in: - /etc/mythtv/config.xml
- /etc/mysql/debian
- /etc/mysql/my.cnf (the
bind
address)
Add your user to the "scanner" group and then log out and back in.
Create file /etc/udev/rules.d/50-brother-scanner.rules
:
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="brother_rules_end"
# Brother ADS-2000
ATTR{idVendor}=="04f9", ATTR{idProduct}=="60a0", MODE="0666", OWNER="hertz", GROUP="scanner"
LABEL="brother_rules_end"
Then restart udev
with sudo service udev restart
Download VueScan for Linux from Hamrick.com and tar -zxvf vuex6494.tgz
then cp -a Vuescan/* /usr/bin
and enter license info.