Tuesday, January 3, 2012

Howto make an Arch(bang) USB installation on USB

Note: this is something different from using an usb stick as an installation medium:
This is well covered here: https://wiki.archlinux.org/index.php/USB_Installation_Media

To install Arch on an usb medium is explained here but just for Arch: https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_a_USB_key
A short summary:
1. It is best to manually partition the drive.
2. Fstab:
Make sure that /etc/fstab includes the correct partition information for /, and for any other partitions on the USB key. If the usb key is to be booted on several machines, it is quite likely that devices and number of available hard disks vary. So it is advised to use UUID or label:

To get the proper UUIDs for your partitions issue terminal command: blkid

When it comes time to edit /etc/fstab, you should use the following. Add one line to move /tmp into ram, use UUID to use persistent naming and change your primary mountpoint to "noatime,nodiratime" to reduce wear:

tmpfs /tmp tmpfs nosuid,nodev 0 0
UUID=... / ext4 defaults,noatime,nodiratime 0 1


3. Mkinitcpio.conf

You may also need to add usb to /etc/mkinitcpio.conf in order to boot correctly from a card on an usb card reader. If you need input from usb devices (i.E. password for dm-crypt) you need usbinput as well:

HOOKS="base udev autodetect pata scsi sata usb filesystems usbinput"

And rebuild the image:

# mkinitcpio -p linux

see: https://wiki.archlinux.org/index.php/CF_and_SD_card_install

4. Grub configuration:
menu.lst, the Grub configuration file, should be edited to (loosely) match the following:

root (hd0,0)
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/3a9f8929-627b-4667-9db4-388c4eaaf9fa ro
initrd /boot/initramfs-linux.img

Note: When grub is installed on the USB key, the key will always be hd0,0
Change the device uuid of course!

+++++++++++++++++++++++++++++++++

Installing on a netbook:
If you don't have have a CD-ROM (on a netbook), you could still do it with 2 flash drives:
-When you load the system from USB, that flash drive will probably be /dev/sdb and you'd then choose /dev/sdc (your 2nd flash drive) as your destination when you're doing the installation {from a post by Will}

The installation will be [b]permanent[/b] (as if you would have installed it on a hard drive)

///////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

The alternative is a persistent installation on an usb stick with Lili in Windows: http://www.linuxliveusb.com/en/features
Some Archbang versions are supported: http://www.linuxliveusb.com/en/supported-linuxes.
The last one is AB 2011.09.
In the new release version 2011.11 will be supported.




Limitations of a persistent installation

In the header of this post I first wrote about a persistent installation. But persistent installation have their limitations while this method equals a full installation.
What can I do and not do on a persistent system?

You have to keep in mind that a persistent system is a Live system on which there is an overlay that is writeable.

This means that core files are in read-only mode while other files are in read/write mode.

What you cannot do on a persistent system:

updates core files (kernel, etc...) = no full system updates
install drivers

What you can do on this kind of system :

install some software
do some software updates
create some files/folders
install Linux (from you USB key) on your PC's hard drive


source: http://www.linuxliveusb.com/en/help/faq/persistence/68-persistent-do-not-do

1 comment:

Anonymous said...

Thanks

Blog Archive