Mike Hommey: Moving a system off to a usb disk
There are cases where you don’t want to bring a laptop with you, but still want to have your data or, even better, your system and configuration. It is actually not so difficult to do if you are using LVM. With my setup, it was quite straightforward. So, if you happen to have a similar setup (2 partitions : one for
Be aware of a few things, though.
You may also want to try to remove the Xorg configuration file (
/boot, and the other one for the LVM physical volume), here are the steps to do the same (assuming the usb disk is /dev/sda, the laptop disk /dev/hda, the LVM volume group vg, and you’re using grub as a bootloader).
- Create equivalent partitions on the usb disk. In my case, the usb disk happens to be much bigger, so the LVM physical volume is going to be more than half free).
- Create an LVM physical volume on the second partition:
/sbin/pvcreate /dev/sda2 - Extend the existing volume group with the new physical volume:
/sbin/vgextend vg /dev/sda2 - Move all data from the laptop disk to the usb disk:
/sbin/pvmove -v /dev/hda2 - Now you have plenty of time during the pvmove, create a new filesystem for
/bootin the first partition:
/sbin/mkfs.ext3 /dev/sda1 - Copy the current
/bootfiles to the new filesystem:
mount /dev/sda1 /mnt
cp -a /boot/. /mnt
umount /mnt - As you will want to mount the new
/bootat boot time, edit/etc/fstabto replace the device for the/bootentry by the new device. Since you probably don’t know in advance what the device will be (you may use the disk on any computer, possibly with a SATA disk that will be onsda), it is preferred to use the UUID of the filesystem to mount it. Get it with:
Then replace the device name (in my casedumpe2fs -h /dev/sda1 grep UUID/dev/hda1) withUUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
pvmove to end), you can reboot right now. Your boot loader setup will use your old /boot partition and the kernel will use the root filesystem on the usb disk.Be aware of a few things, though.
- Your initrd image (which you must have, if you have your root partition under LVM) must include everything that is necessary to load usb devices before mounting the root partition (mkinitramfs in Debian does)
- Current mkinitramfs in Debian has a quite annoying bug, that makes impossible to have an LVM root partition on an usb disk: most of the time, the usb disk is detected after initialization of LVM. If that happens to you, you’re not screwed: you can add
break=mountto the kernel command line, and while you have a shell prompt, wait for the usb disk to come up and just exit the shell, it will continue the boot scripts and initialize LVM properly. On a recent enough initramfs, you can also specifyrootdelay=10, replacing 10 with the number of seconds you want the boot to be delayed to wait for usb devices.
- Remove the laptop disk physical volume from the volume group:
vgreduce vg /dev/hda2 - Setup grub on the usb disk, so that you can boot off the disk directly if the BIOS supports it:
You probably won’t have to change the menu.lst file, because it must already be using/usr/sbin/grub
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup --prefix=/grub (hd1)
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/menu.lst"... succeeded
Done.
grub> quit
hd0, which will be what grub sees for the usb disk when booting off it. Also note your usb disk might not be hd1 under grub, depending on the number of disks on your system.
You may also want to try to remove the Xorg configuration file (
/etc/X11/xorg.conf) so that the video driver and resolution are not hardcoded ; recent enough Xorg do runtime detection, and that worked pretty well on the two laptops I booted with the usb disk.
I just noticed, that Python Jabber transports have been migrated this
weekend to
* [VAC] I will not able to do any
There's no way around it: I'm a bit of a
If you’re using a Virtuozzo-based VPS running Debian Testing or Unstable (and probably other modern Linux distributions), you will probably run into problems regarding the patches used in the default kernel and glibc 2.7, which were properly described in the
Day three in Extremadura







I decided that my christmas gift will be a new notebook and as I'm always complaining of the weight of my HP dv6000 then my new notebook will be a ThinkPad x61 with a 8cell battery and extended battery life! :-) That gives up to 12 hours of use!! BTW, this version includes a weird antenna in the right side of the screen, I don't know if it's really useful but seems like if were from some movie and is outside of the borders but anyway, still little and light.
Now only rests to wait until it gets to my hand since all the custom houses of Venezuela decided to not admit more packages from outside of the country because they're full, so I will have to wait until january probably because of the inefficiency of my country custom officials.
But at least I'm gonna have it :-)!

I first heard about the
DeBaBaReTools seems to work good enough that writing an early-stage HOW TO seems to worth the time :)
After a lot of hacking I've now got chronicle displaying comments upon entries.
Since my blog is compiled on my home desktop machine and comment submission happens upon a remote machine the process involves a bit of a hack: