This is my ANOPS setup.
ANOPS is
ANOther
Portable
Studio based on AV Linux.
Goal
===
- Portable usb hard disk installation
- Ability to install avl to other systems
- Create and restore system backups
NOTE:
1.
All disk, partition and device file names are ONLY PLACEHOLDERS !!! These are eg. /
dev/sdg, /dev/sdg1, /dev/sdg2, ... Also
(hd0), (hd2), (hd0,4), (hd2,4), .. Further
WD1_P1_AVLL, WD1_P2_AVLR, wd1_p5_avl42, ... Be shure you know at any time which are the right device names.
2. If you have multiple live boot partitions available to the system,
eg. boot cdroms and/or unetbooting partitions, it's likely that the wrong
image is loaded. (That's why /live is moved to /liveorg in "fix live boot".
3. After the installation, the system boots with grub to the AV Linux intallation.
If you delete/format this partition, you cannot boot the "Live" or "Restore" partitions anymore.
(You need another running system to toggle the boot flag to the "Live" or "Restore" partition to fix this.)
4. Backup the data and bkp partitions to a different drive if you want a full backup.
5. !!! <- these are important notes.
Prerequisites
==========
- a usb disk that can be completly whiped, all data will be lost !!!
- free USB 2.0 Port, no keyboard, mouse or usb audio device connected to this port (one port usually has several plugs)!
- running linux system as base
- gparted
- unetbootin
- avlinux4.2-liqx-lxde-i386-en.iso image
Installation steps
=============
- boot base linux
- prepare partitions and file systems on usb hard drive
- install avl42 live system with unetbootin on usb hard drive
- boot avl42 live from usb hard drive
- install avl42, no reboot
- fix grub installation
- fix boot flag
- boot avl from usb hard drive, add rt-kernel
- fix live boot
- create system backup
- make system backup restoreable
- restore system
Used base
========
- Tested on existing AVLinux 4.1 and AVLinux 4.2 installation
Used partitions
===========
- partition for live boot
- partition for restore boot, file exchange
- partition for swap
- partition for os
- partition for os backup
- partition for data
My hard disk setup:
usb drive size: 500.1 GB, Western Digital
Labels: HDName_PartitionNumber_Purpose
Usage Partition Size Type Label
AVL live boot p1 4GB fat32 WD1_P1_AVLL
AVL restore boot p2 32GB fat32 WD1_P2_AVLR
swap p3 2GB swap
extended partition p4
AVL 4.2 os p5 32GB ext3 wd1_p5_avl42
backup p6 32GB ext3 wd1_p6_bkp
data p7 rest ext3 wd1_p7_data
boot base linux
============
Do it.
prepare partitions:
==============
Your disk will probably have a different name than /dev/sdg !!!
All data on disk will be lost.
Find usb disk
root terminal, find by size
fdisk -l
Disk /dev/sdg: 500.1 GB
or
menu -> system tools -> disk utility
-> wd elements -> device: /dev/sdg
umount all partitions of /dev/sdg
menu -> preferences -> gparted
select disks (upper right) (dev/sdg)
delete existing partitions
new partition: primary partition, filesystem fat32, new size (4*1024MiB) 4096MiB, Label WD1_P1_AVLL, add
new partition: primary partition, filesystem fat32, new size (32*1024MiB) 32768MiB, Label WD1_P2_AVLR, add
new partition: primary partition, filesystem linux swap, new size (2*1024Mib) 2048MiB, add
new partition: Extended Partition, add
new partition: Logical Partition, filesystem ext3, new size (32*1024MiB) 32768MiB, Label wd1_p5_avl42, add
new partition: Logical Partition, filesystem ext3, new size (32*1024MiB) 32768MiB, Label , wd1_p6_bkp add
new partition: Logical Partition, filesystem ext3, Label , wd1_p7_data add -> (362,76 GiB)
Apply All Operations
Close, Quit
install avl42 live system
==================
Unplug, replug usb drive / check with "mount" in terminal -> /dev/sdg1 on /media/WD1_P1_AVLL type vfat !!!
Menu -> System Tools -> UNetbootin
Select Diskimage
Select Image file -> /path/to/avlinux4.2-liqx-lxde-i386-en.iso
Type USB Drive, Drive /dev/sdg1
Ok
Exit
boot avl42 live from usb hard drive
==========================
Reboot, select to boot from usb drive while booting
install avl42
=========
Now in AVL42 live booted from usb disk.
check mount points in terminal: "mount" -> /dev/sdg* are the partitions (could change)!!!
Install AV Linux (Desktop)
continue, yes
continue, ok
select sdg, ok
quit (gparted)
select sdg3 for swap, ok
select sdg5 for root, ok
select root, put /home on the root partition, ok
root pw, ok, twice
user real name, ok
user name, ok
pw for user, ok, twice
hostname, ok
select grub installation: root, root partition !!!, ok
time zone
continue? yes
installation: root will be formated -> label gone.
reboot? -> No!!!
restore fs label
in root terminal
check label
e2label /dev/sdg5
set label
e2label /dev/sdg5 wd1_p5_avl42
check label
e2label /dev/sdg5
fix grub installation
==============
Grub does not calculate the "right" boot disk (the name that the bios uses).
When /dev/sdg is booted using the the boot menu from the bios, the bios names are reordered.
sdg and sda are only placeholders!!! check your own config!!!!
So:
normal boot: /dev/sda = (hd0)
/dev/sdg = (hd2)
usb boot: /dev/sdg = (hd0)
/dev/sda = something else
when grub is installed, the "normal" boot/disk order is assumed. This has to be fixed.
fix grub
in root terminal
check if "root" is mounted:
mount | grep sdg5
if yes umount:
umount /dev/sdg5
start fix:
mount /dev/sdg5 /mnt
bind fs to "root"
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
copy device.map
cp /mnt/boot/grub/device.map /mnt/boot/grub/device.map.org
fix device map
gedit /mnt/boot/grub/device.map
-> make shure /dev/sdg is (hd0)
(hd0) /dev/sdg
(hd1) /dev/sdb
(hd2) /dev/sda
(hd3) /dev/sdh
save
the grub menu is now wrong (hd2,4) should be (hd0,4), (grub partition number 4 is linux partition number 5) check your own configuration!!!
fix menu.lst
cp /mnt/boot/grub/menu.lst /mnt/boot/grub/menu.lst.org
gedit /mnt/boot/grub/menu.lst
change:
# groot=(hd2,4)
to:
# groot=(hd0,4)
after the comment:
### END DEBIAN AUTOMAGIC KERNELS LIST
add:
title AV Linux 4.2 Live Image
root (hd0,0)
chainloader +1
title AV Linux 4.2 Restore Image
root (hd0,1)
chainloader +1
reinstall grub to /dev/sdg5
chroot /mnt /usr/sbin/grub-install /dev/sdg5
run "update-grub"
chroot /mnt /usr/sbin/update-grub
clean
umount /mnt/dev
umount /mnt/proc
umount /mnt
fix boot flag
=========
make installation bootable.
let the mbr, that was installed with unetbooting boot from /sdg5:
run gparted: choose /dev/sdg: enable boot flag on /dev/sdg5 (, remove boot flag on all other partitions of /dev/sdg)
boot avl from usb hard drive
=====================
set symlinks
cd
ln -s /media/wd1_p7_data data
ln -s /media/wd1_p6_bkp bkp
install rt-kernel
http://www.remastersys.com/forums/index.php?topic=1162.msg6430#msg6430use this script to get your usb disk port:
get-usbdisk-port
#!/bin/bash
#get partition
part=$(mount| grep " / "|cut -c 6-9)
#echo / mounted on $part
pcipart=$(ls -l /dev/disk/by-path/| grep $part|awk '{print $(NF-2)}')
#echo $pcipart
pci=${pcipart%-usb*}
pcinr=${pci#pci-}
#echo $pci
#ls -la /sys/devices/pci*/$pcinr
usbport=$(ls -la /sys/devices/pci*/$pcinr/|grep usb |awk '{print $NF}')
usbdriver=$(ls -la /sys/devices/pci*/$pcinr| grep driver|awk -F'/' '{print $NF}')
#echo $usbport
#echo $usbdriver
#echo "rtirq name: $usbdriver:$usbport"
echo "$usbdriver:$usbport"
setup /etc/default/rtirq
mine looks like this, but i'm not shure if its the best setting.
ehci_hcd:usb1 is the output from the get-usbdisk-port script. hdsp is my sound card.
gedit /etc/default/rtirq
RTIRQ_NAME_LIST="rtc hdsp ehci_hcd:usb1"
RTIRQ_NON_THREADED="rtc hdsp ehci_hcd:usb1"
RTIRQ_HIGH_LIST="timer sirq-tasklet sirq-block"
cutomize your setup
fix live boot
=========
root terminal
gedit /media/WD1_P1_AVLL/syslinux.cfg
add to every "append" entry that has the "boot=live" option:
live-media-path=/liveorg
mv /media/WD1_P1_AVLL/live /media/WD1_P1_AVLL/liveorg
create system backup
=================
preferences -> remastersys backup
Backup - Backup complete system including user data
(this will not backup data partition)
terminal:
mkdir ~/bkp/some-date
cp /home/remastersys/remastersys/avlinux4.2-liqx-lxde-i386-en.iso* ~/bkp/some-date
make system backup restoreable
=========================
root terminal:
cd /media/WD1_P2_AVLR/
rm -r isolinux live preseed ldlinux.sys menu.c32 syslinux.cfg ubnfilel.txt ubninit ubnkern ubnpathl.txt
system tools -> unetbootin
diskimage, iso: /home/your-user-name/bkp/some-date/avlinux4.2-liqx-lxde-i386-en.iso
drive /dev/sdg2
ok
exit (no reboot)!!!
remake existing installation bootable !!!:
gparted: /dev/sdg: enable boot flag on /dev/sdg5 (, remove boot flag on all other partitions of /dev/sdg)
fix permissions:
because unetbooting was run as first program after installation?
su
root@your-user-name:/home/your-user-name# ls -la .config/gtk-2.0
chown -R your-user-name:your-user-name .config/gtk-2.0
restore system
===========
Boot usb drive, grup option "AV Linux 4.2 Restore Image"
preferences -> remstersys installer
continue, yes
continue, ok
select sdg, ok
quit gparted
select sdg3 for swap, ok
select sdg5 for root, ok
select root, put /home on root partition, ok
enter hostname, ok
select root for grub installaion !!!, ok
configure time zone, ok
continue, yes
reboot now?, no !!!
restore fs label
in root terminal
check label
e2label /dev/sdg5
set label
e2label /dev/sdg5 wd1_p5_avl42
check label
e2label /dev/sdg5
fix grub installation
root terminal:
check if "root" is mounted:
mount | grep sdg5
if yes, umount
umount /dev/sdg5
mount /dev/sdg5 /mnt
bind fs to "root":
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
copy device.map
cp /mnt/boot/grub/device.map /mnt/boot/grub/device.map.org
fix device map
gedit /mnt/boot/grub/device.map
-> make shure /dev/sdg is (hd0)
(hd0) /dev/sdg
(hd1) /dev/sdb
(hd2) /dev/sda
(hd3) /dev/sdh
save
fix menu.lst
cp /mnt/boot/grub/menu.lst /mnt/boot/grub/menu.lst.org
gedit /mnt/boot/grub/menu.lst
# groot=(hd2,4)
->
# groot=(hd0,4)
after
### END DEBIAN AUTOMAGIC KERNELS LIST
add:
title AV Linux 4.2 Live Image
root (hd0,0)
chainloader +1
title AV Linux 4.2 Restore Image
root (hd0,1)
chainloader +1
reinstall grub
in root terminal
chroot /mnt /usr/sbin/grub-install /dev/sdg5
run "upadate-grub"
chroot /mnt /usr/sbin/update-grub
clean
umount /mnt/dev
umount /mnt/proc
umount /mnt
reboot
That's it.
Hope this works for you.
I run this setup for some time with AV Linux 4.1.
Now I'm updating to 4.2 and I like to share it.
I can do 8 track recordings with ardour. I did tests with 16 tracks, this should work also.
8 tracks worked with liquorix and ardour2, the same session works only with the rt-kernel in ardour3.
YMMV.
Adaw