I found the following pages helpful:
https://superuser.com/questions/1031283/how-to-get-the-data-off-of-a-readynas-drive
https://jim-st.blogspot.com/2012/07/mouning-readynas-drives-on-x86-systems.html
https://technostuff.blogspot.com/2012/06/how-to-mount-disk-used-by-readynas.html
I found that the right-hand drive was mountable, but required installation of some packages on a Fedora 29 desktop system:
git clone https://github.com/alperakcan/fuse-ext2.git
dnf install autoconf automake libtool
dnf install libfuse-dev e2fsprogs comerr-dev e2fslibs-dev
dnf install fuse-libs fuse3-libs
dnf install fuse-devel fuse3-devel
https://fedora.pkgs.org/29/fedora-x86_64/libcom_err-devel-1.44.3-1.fc29.x86_64.rpm.html
dnf install Downloads/libcom_err-devel-1.44.3-1.fc29.x86_64.rpm
dnf install e2fsprogs-libs e2fsprogs-devel
Next steps:
vgchange -ay c
lvscan
fuse-ext2 -o sync_read,allow_other,rw+ /dev/c/c /mnt/tmp
Data now accessible in /mnt/tmp
2019-04-15
2014-07-23
Installing Win7 guest on KVM with CentOS 7
Installation with virt-manager is fairly straightforward. However, unfortunately, this results in a guest that uses the very slow IDE disk driver. Changing to use virtio is a little tricky - this blog post was very helpful: http://setdosa.blogspot.com/2013/09/moving-your-windows-guest-from-ide-to.html
This is a general handy guide:
https://support.opennodecloud.com/wiki/doku.php?id=usrdoc:os:win-guest
This is a general handy guide:
https://support.opennodecloud.com/wiki/doku.php?id=usrdoc:os:win-guest
2013-08-29
Installing Win7 guest in Virtualbox from a USB stick image
- Use dd to make an image file of the entire stick - e.g. dd if=/dev/sdg of=usb_stick.img
- Copy to target machine.
- Convert to .vmdk file using: "VBoxManage internalcommands createrawvmdk -filename output_usb.vmdk -rawdisk usb_stick.img (thanks to: http://www.dallagnese.fr/en/computers-it/boot-on-your-usb-drive-in-virtualbox-4/ ).
- Add the image file to the SATA controller as a hard drive. Make sure it has lowest SATA port number.
2013-02-16
SSH via intermediate host
In terminal on local machine:
$ ssh -f -N -L6969:localhost:6969 intermeduser@intermedhost
$ ssh intermeduser@intermed
intermedhost$ ssh -f -N -L6969:localhost:22 destuser@desthost
Then, in other local terminals:
$ ssh -p 6969 destuser@localhost
$ ssh -f -N -L6969:localhost:6969 intermeduser@intermedhost
$ ssh intermeduser@intermed
intermedhost$ ssh -f -N -L6969:localhost:22 destuser@desthost
Then, in other local terminals:
$ ssh -p 6969 destuser@localhost
2013-01-14
Updating Seagate Barracuda 7200.11 drive firmware on a Dell Optiplex 960
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.
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.
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.
2011-04-13
apcupsd with APC SmartUPS and AP9617 using PCNET
Clarifications, based on apcupsd 3.14 and AP9617 FW version 3.7.3:
- The DEVICE password in apcupsd.conf needs to match the "Authentication Phrase" in UPS->PowerChute->configuration
- The IP address of the host that is running apcupsd must be added to "PowerChute Network Shutdown Clients" in UPS->PowerChute->clients
- I have two SmartUPSs, one feeding each redundant power supply. I used the multiple UPS Example in the manual, but did not null-configure the shutdown scripts, so that either UPS failing would initiate a shutdown. Unfortunately, it seems the PCNET port number cannot be changed, and both apcupsd instances want to bind it.
- The DEVICE password in apcupsd.conf needs to match the "Authentication Phrase" in UPS->PowerChute->configuration
- The IP address of the host that is running apcupsd must be added to "PowerChute Network Shutdown Clients" in UPS->PowerChute->clients
- I have two SmartUPSs, one feeding each redundant power supply. I used the multiple UPS Example in the manual, but did not null-configure the shutdown scripts, so that either UPS failing would initiate a shutdown. Unfortunately, it seems the PCNET port number cannot be changed, and both apcupsd instances want to bind it.
2011-03-29
multilog patch update for daemontools
I found this useful patch to provide human-readable dates for daemontools multilog:
http://blog.endersys.com/2009/12/qmail-multilog-localtime-patch-for-daemontools-0-76/
Unfortunately, the time format that was chosen is not useful for navigating lengthy logfiles.
Here's my version that uses ISO-8601 date format.
2011-01-28
Dell OMSA: how to enable SNMP on openSUSE
Quite easy for openSUSE 11.3 . The only modification to normal procedure is to replace this line in /etc/snmp/snmpd.conf :
#rocommunity public 127.0.0.1
rocommunity public
2011-01-27
Dell OMSA: how to enable SNMP on Debian
This worked for me with Debian Lenny on a PE 2900. Reposting, since it took a bit of digging to find it. Credit to Bas Roos
--------------------------------------------------------------------------------------
* apt-get install snmpd
* Edit /etc/snmp/snmpd.conf
- Comment out 'com2sec paranoid default public
- Uncomment out '#com2sec readonly default public'
- Change 'default' into our management IP range in the previous
step (resulting in 'com2sec readonly 192.168.2.0/24 public')
* Edit /etc/default/snmpd
- Change SNMPDOPTS
- Before: SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux
-p /var/run/snmpd.pid 127.0.0.1'
- After: SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -p
/var/run/snmpd.pid 0.0.0.0' (this enabled smux and made snmpd listen on
all interfaces, instead of lo)
* /etc/init.d/dataeng enablesnmp (this should enable SNMP for both dataeng
itself, as it adds a line to /etc/snmp/snmpd.conf)
* /etc/init.d/dataeng restart (restarts dataeng and starts dsm_sa_snmp32d)
* /etc/init.d/snmpd restart
After this, SNMP seems to be working:
username at mgmt-server:~$ snmpwalk -v 2c -c public 192.168.2.71
.1.3.6.1.4.1.674.10892.1.300.10.1.11.1
SNMPv2-SMI::enterprises.674.10892.1.300.10.1.11.1 = STRING: "
here>"
2010-10-12
SanDisk U3 flash drives - U3 removal
The U3 rubbish can be removed using Linux, without running the Windows tool. (Instructions found buried in the comments to this blog post:
http://www.theatreofnoise.com/2006/08/uninstall-u3-and-free-your-usb-drive.html
)
- Mount the U3 volume, and use the 'mount' command to get the device name (/dev/sr1 in my case).
- Change directory to /sys/class/block/sr1/device (change 'sr1' as applicable).
- Enter 'echo 1 > delete'.
- Voila!
2010-08-12
Digi Edgeport/8 persistent serial port assignments
Here's how to add arbitrary symlinks referencing specific ports:
In /etc/udev/rules.d/60-persistent-serial.rules , insert lines like the following just above the final LABEL (included for reference). (Obviously, you'll need to change it for the serial number of your own adapter). This example sets links for ports 5 through 8 (as labelled on the adapter box):
ENV{ID_SERIAL}!="Digi_International_Edgeport_8_I01845608-2", GOTO="persistent_serial_3"
ENV{ID_PORT}=="0",SYMLINK+="ttyBellows"
ENV{ID_PORT}=="1",SYMLINK+="ttyDetector"
LABEL="persistent_serial_3"
ENV{ID_SERIAL}!="Digi_International_Edgeport_8_I01845608-3", GOTO="persistent_serial_end"
ENV{ID_PORT}=="0",SYMLINK+="ttyMosaicGrating"
ENV{ID_PORT}=="1",SYMLINK+="ttySlit"
LABEL="persistent_serial_end"
In /etc/udev/rules.d/60-persistent-serial.rules , insert lines like the following just above the final LABEL (included for reference). (Obviously, you'll need to change it for the serial number of your own adapter). This example sets links for ports 5 through 8 (as labelled on the adapter box):
ENV{ID_SERIAL}!="Digi_International_Edgeport_8_I01845608-2", GOTO="persistent_serial_3"
ENV{ID_PORT}=="0",SYMLINK+="ttyBellows"
ENV{ID_PORT}=="1",SYMLINK+="ttyDetector"
LABEL="persistent_serial_3"
ENV{ID_SERIAL}!="Digi_International_Edgeport_8_I01845608-3", GOTO="persistent_serial_end"
ENV{ID_PORT}=="0",SYMLINK+="ttyMosaicGrating"
ENV{ID_PORT}=="1",SYMLINK+="ttySlit"
LABEL="persistent_serial_end"
2010-08-05
Digi Edgeport/8 persistent serial port assignments
Even better than patching usb-serial.ko is to use the /dev/serial/by-id links that are provided with recent versions of Udev.
In the case of Debian Lenny (5.0.4), where the version of Udev (125) is too old, patching /lib/udev/path_id as follows:
--- a/extras/path_id/path_id
+++ b/extras/path_id/path_id
@@ -515,6 +515,9 @@ handle_device () {
*/host[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*)
handle_scsi "$D"
;;
+ */ttyUSB*)
+ D=${D%/ttyUSB*}
+ ;;
*/usb[0-9]*/[0-9]*/*)
handle_usb "$D"
;;
and copying /lib/udev/60-persistent-serial.rules (the latter goes to /etc/udev/rules.d) provides the capability.
2010-05-18
How to do a remote installation of Debian 5.0.4 on a Dell Poweredge 2900 using the DRAC 5 Virtual Media feature
1. Update the DRAC firmware to the latest revision (System->Remote Access). I have 1.51
2. Install a 32-bit version of Firefox 3.0, along with 32-bit Java plugin. This allows the "Native" plug-in to be installed and work!
3. Download the Debian netinst iso image, and "connect" it (set "Auto-Attach").
4. Boot the server - press F11 so you can select the Virtual CD-ROM from the boot menu.
5. During the installation, the CD-ROM mount may fail. Start the shell from the installer menu, and mount /dev/sr1 on /cdrom. Check to make sure /cdrom shows the CD content.
6. After partitioning is complete, unmount /cdrom. (THis took forever to find out!)
2010-05-10
How to get a Digi Edgeport/8 working with RHEL/CentOS 5 - part 2
It turns out this wasn't the entire story. The device filenames that are created when the device is plugged-in (or at boot-up) depend on what other usb-serial devices are also connected, and which USB ports they are plugged into.
The standard advice is to use 'udev' to cause symlinks to be created that refer to the adapter ports independently of the kernel-assigned /dev/ttyUSBn names.
Unfortunately, in kernel 2.6.18, as shipped, this port information is not in the 'sysfs' database.
Fortunately, I found this patch, which enabled me to build an updated usb-serial.ko (using the procedure in the previous post).
Once installed, the following udev rules file /etc/udev/rules.d/11-edgeport.rules :
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-0",NAME="%k",SYMLINK="ttyEDGE8_0_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-1",NAME="%k",SYMLINK="ttyEDGE8_1_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-2",NAME="%k",SYMLINK="ttyEDGE8_2_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-3",NAME="%k",SYMLINK="ttyEDGE8_3_$sysfs{port_number}"`
causes symlinks to be created like this:
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_0_0 -> ttyUSB1
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_0_1 -> ttyUSB2
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_1_0 -> ttyUSB3
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_1_1 -> ttyUSB4
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_2_0 -> ttyUSB5
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_2_1 -> ttyUSB6
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_3_0 -> ttyUSB7
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_3_1 -> ttyUSB8
The standard advice is to use 'udev' to cause symlinks to be created that refer to the adapter ports independently of the kernel-assigned /dev/ttyUSBn names.
Unfortunately, in kernel 2.6.18, as shipped, this port information is not in the 'sysfs' database.
Fortunately, I found this patch, which enabled me to build an updated usb-serial.ko (using the procedure in the previous post).
Once installed, the following udev rules file /etc/udev/rules.d/11-edgeport.rules :
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-0",NAME="%k",SYMLINK="ttyEDGE8_0_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-1",NAME="%k",SYMLINK="ttyEDGE8_1_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-2",NAME="%k",SYMLINK="ttyEDGE8_2_$sysfs{port_number}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="*-3",NAME="%k",SYMLINK="ttyEDGE8_3_$sysfs{port_number}"`
causes symlinks to be created like this:
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_0_0 -> ttyUSB1
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_0_1 -> ttyUSB2
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_1_0 -> ttyUSB3
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_1_1 -> ttyUSB4
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_2_0 -> ttyUSB5
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_2_1 -> ttyUSB6
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_3_0 -> ttyUSB7
lrwxrwxrwx 1 root root 7 May 10 14:53 /dev/ttyEDGE8_3_1 -> ttyUSB8
Subscribe to:
Posts (Atom)