This was a real head-scratcher, because Seagate's ISO image would NOT boot on this machine, whether burnt to a CD or written to a flash drive with unetbootin.
I eventually succeeded by extracting the El Torito floppy image from the ISO using http://freecode.com/projects/geteltorito and then putting the files on a FreeDOS bootable flash drive using unetbootin.
I also found that unetbootin/FreeDOS requires a FAT16 formatted primary partition on the flash drive to work properly.
2013-01-14
2012-04-27
Obscure xinetd tip
If you have a "wait=yes" server bound to 127.0.0.1, you can get a syslog full of messages like this:
xinetd[25741]: warning: can't get client address: Transport endpoint is not connected
The trick is to add "flags=NOLIBWRAP".
THis bug report gives a clue as to the underlying cause: https://bugzilla.redhat.com/show_bug.cgi?id=108583
xinetd[25741]: warning: can't get client address: Transport endpoint is not connected
The trick is to add "flags=NOLIBWRAP".
THis bug report gives a clue as to the underlying cause: https://bugzilla.redhat.com/show_bug.cgi?id=108583
2012-04-05
Migrating a guest VM with Xen 3.2
'xen migrate' didn't work - it hung, as others have reported.
It turned out to be as simple as:
It turned out to be as simple as:
- Stop the original guest.
- Copy the disk image and the config files ( in /etc/xen/vm) to the new host.
- Execute 'xm create guest-name' on the new host.
- Done!
2012-03-25
Expanding a Xen image disk
I found various pages on this, but the instructions weren't quite accurate for openSUSE 11.0
1. Stop the guest.
2. Find the image file with 'losetup -a'
3. Make a backup copy.
4. Add (e.g. 4Gbyte) with: dd if=/dev/zero bs=1024k count=4096 >> /xen/images/yourguest/disk0
5. Mount with: xm block-attach 0 'file:/xen/images/yourguest/disk0' /dev/xvda
6. Using fdisk, find the partition, and resize it.
7. Use resize2fs to increase the filesystem to fill the space, run fsck -f to verify.
8. Unmount with: xm block-detach 0 /dev/xvda
9: Restart the guest.
1. Stop the guest.
2. Find the image file with 'losetup -a'
3. Make a backup copy.
4. Add (e.g. 4Gbyte) with: dd if=/dev/zero bs=1024k count=4096 >> /xen/images/yourguest/disk0
5. Mount with: xm block-attach 0 'file:/xen/images/yourguest/disk0' /dev/xvda
6. Using fdisk, find the partition, and resize it.
7. Use resize2fs to increase the filesystem to fill the space, run fsck -f to verify.
8. Unmount with: xm block-detach 0 /dev/xvda
9: Restart the guest.
2012-01-19
Recovering a Linux SW RAID1 volume
I had one disk of a RAID1 set, and wanted to recover the data from some LVMs on it.
Turned out to be quite straightforward:
1. Plugged the drive into another openSUSE 12.1 box with a USB-HDD adapter.
2. As root, did mdadm --assemble --scan
3. 'cat /proc/mdstat' showed me the md devices that were found:Personalities : [linear] [raid1]
md124 : active raid1 sdg1[0]
506032 blocks super 1.0 [2/1] [U_]
bitmap: 0/8 pages [0KB], 32KB chunk
md125 : active raid1 sdg2[0]
155726004 blocks super 1.0 [2/1] [U_]
bitmap: 19/149 pages [76KB], 512KB chunk
md126 : inactive sdf1[0](S)
506032 blocks super 1.0
md127 : inactive sdf2[0](S)
155734036 blocks super 1.0
unused devices: <none>
4. lvscan showed me the LVs on the volume.
inactive '/dev/system1/home' [70.00 GiB] inherit
inactive '/dev/system1/lclhome' [30.00 GiB] inherit
inactive '/dev/system1/root' [20.00 GiB] inherit
inactive '/dev/system1/swap' [4.00 GiB] inherit
inactive '/dev/system1/usr' [6.00 GiB] inherit
ACTIVE '/dev/system/home' [25.00 GiB] inherit
ACTIVE '/dev/system/root' [20.00 GiB] inherit
ACTIVE '/dev/system/swap' [2.00 GiB] inherit
5. Activated the LVs using 'vgchange -a y'
6. Ready to mount!
Turned out to be quite straightforward:
1. Plugged the drive into another openSUSE 12.1 box with a USB-HDD adapter.
2. As root, did mdadm --assemble --scan
3. 'cat /proc/mdstat' showed me the md devices that were found:Personalities : [linear] [raid1]
md124 : active raid1 sdg1[0]
506032 blocks super 1.0 [2/1] [U_]
bitmap: 0/8 pages [0KB], 32KB chunk
md125 : active raid1 sdg2[0]
155726004 blocks super 1.0 [2/1] [U_]
bitmap: 19/149 pages [76KB], 512KB chunk
md126 : inactive sdf1[0](S)
506032 blocks super 1.0
md127 : inactive sdf2[0](S)
155734036 blocks super 1.0
unused devices: <none>
4. lvscan showed me the LVs on the volume.
inactive '/dev/system1/home' [70.00 GiB] inherit
inactive '/dev/system1/lclhome' [30.00 GiB] inherit
inactive '/dev/system1/root' [20.00 GiB] inherit
inactive '/dev/system1/swap' [4.00 GiB] inherit
inactive '/dev/system1/usr' [6.00 GiB] inherit
ACTIVE '/dev/system/home' [25.00 GiB] inherit
ACTIVE '/dev/system/root' [20.00 GiB] inherit
ACTIVE '/dev/system/swap' [2.00 GiB] inherit
5. Activated the LVs using 'vgchange -a y'
6. Ready to mount!
2012-01-13
KDE4 and ssh-agent
Using KDE Wallet to store your SSH passphrase is now quite easy.
You need ksshaskpass installed.
Add a script to ~/.kde4/Autostart/ called (e.g.) ssh-add.sh, with execute permission, containing:
#!/bin/sh
export SSH_ASKPASS=/usr/lib64/ssh/ksshaskpass
/usr/bin/ssh-add
Next time you login, you'll be prompted for your KDE Wallet password, then your password.
Works well. Thanks to this helpful post for getting me started.
You need ksshaskpass installed.
Add a script to ~/.kde4/Autostart/ called (e.g.) ssh-add.sh, with execute permission, containing:
#!/bin/sh
export SSH_ASKPASS=/usr/lib64/ssh/ksshaskpass
/usr/bin/ssh-add
Next time you login, you'll be prompted for your KDE Wallet password, then your password.
Works well. Thanks to this helpful post for getting me started.
2011-05-03
SanDisk CF card as HDD for embedded PC
Purchased a 16GB SanDisk CF card as upgrade to a 4GB unit, for main drive in embedded PC (IDE-CF interface). First attempt to partition the card showed first available sector as being number 2048. Further research seemed to indicate that this might be a result of consumer and pro grade SanDisk CFs are shipped in "Removable Disk" mode, and I would need to convert it to "Fixed Disk" mode.
I was able to find a SanDisk conversion utility, but this required connecting the card via an IDE adapter and booting to DOS. While waiting for hardware, I tried just using dd to copy the entire drive image to a file; then using
this guide to resize the root partition with fdisk and parted; then dd'd the new image to the new card.
I was surprised to see that the partition table on the newly-loaded card appeared normal (no 2048 sector offset). And it booted fine.
Life is good.
I was able to find a SanDisk conversion utility, but this required connecting the card via an IDE adapter and booting to DOS. While waiting for hardware, I tried just using dd to copy the entire drive image to a file; then using
this guide to resize the root partition with fdisk and parted; then dd'd the new image to the new card.
I was surprised to see that the partition table on the newly-loaded card appeared normal (no 2048 sector offset). And it booted fine.
Life is good.
Subscribe to:
Posts (Atom)