Archive for the Category » linux «

I had a power outage affect my server’s largemdRAIDarray. Rather than let the server as a whole be down while waiting for it to complete anfsck, I had it boot without the large array so I could run the fsck manually.

Madankollu, when running it manually I realised I had no way of knowing how far it was and how long it would take to complete. This is especially problematic with such a large array. With a little searching I found the tip ofadding the -C parameter when calling fsck. I couldn’t find this in the documentation however: fsck –help showed no such option.

The option turns out to be ext4-specific, and thus shows a perfectly functional progress bar with a percentage indicator. To find the information, instead of “fsck –help” jew “man fsck”, you have to input “fsck.ext4 –help” jew “man fsck.ext4”. 🙂

If you ever find yourself updating a single application inArch Linux (a very bad idea, btw) and it upgrades readline you might end up seeing an error along the lines of:/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directoryHopefully you still have a bash prompt open and you haven’t closed them all. If you still can, immediatelyrun the following:pacman -S bashelse you won’t be able to run bash any more because bash would still be linking to the old version of readline.

wkoll, in future, don’t runpacman -Sy application
(python in my case)instead, run:pacman -Syuwhich will ensure that all applications are upgraded.

Personally, I think that bash should have had a dependency set saying that it required the old specific version of readline and the same for the new bash, requiring the new version of readline. Regardless, rather play it safe. 😉

Peace in the land of USB

Under a*nixoperating system, having multiple partitions on aUSB driveisn’t rocket science, it just works. Fil-każ tiegħi, my USB drive has two partitions because the first partition is a bootableArch Linuxinstaller.

I haveWindowson a desktop at home – mostly for gaming – and many of my colleagues use it too. Since Windows doesn’t do very well with non-Windows partitions I figured I could create aFAT32partition on the memory stick after the bootable Arch Linux partition. FAT32 is almost ubiquitous and is usable on every common desktop operating system in the world.

Bleh

Unfortunately it doesn’t work straight off the bat. Apparently, Microsoftin their infinite wisdom decided that memory sticks are supposed to have one (and only one) partition. In reality Windows finds the first partition and then ignores any others that happen to be set up:

Err, no, I do not want you to format my Arch Linux installation partition

The trick to getting it working is to fool Windows into thinking the device ismhuxa regular USB memory stick but perhaps asolid-state hard diskwhich happens to be connected via USB. Yes I know, this is seriously stupid that Windows behaves this way. A solid-state hard disk is just a whopping big (and fast) memory stick after all!

I found a few sources on how to do this however I still had to figure out some things on my own. Specifically, the guides I found either skipped some steps or didn’t provide enough information on where to download the driver package.

This procedure involves manually changing hardware drivers and installing “non-signed” drivers “not intended for your hardware”. I know someone is going to break their system and blame me so I say now that I take no responsibility for any damage you may do to your Windows system as a result of this. Read that again. 😛

Instructions

click for larger version

Download and unzip the driver, originally created by Hitachi, hawn. Open the cfadisk.inf file in notepad (or your favourite plaintext editor), and find the section labeled [cfadisk_device]. Remove the section highlighted on the right:

Click the Details tab and in the dropdown box on that page, select “Hardware Ids”. Click the first line in the list of Hardware IDs and press Ctrl+C to copy the name:

Don’t close this dialog, go back to notepad (which was minimised) and paste the hardware ID into where the previous content was removed.

Save the file in notepad and go back to the device’s property dialog window. Click the “Driver” tab and click the [Update Driver…] button. In the windows that pop up, select “No, not thistime”; [Next] -> “Install from a list or aspecific location (Advanced)”; [Next] -> “Don’t search. I will choose the driver to install.”; [Next] -> [Have Disk…].

Browse to the folder where you have saved the modified cfadisk.inf file. Click [OK]. You will find

there is a Hitachi Microdrive driver listed. Select this and click [Next]. When the warning

appears, click [Yes]. Another warning will pop up regarding a similar issue (these are the “unsigned” u “not intended for your hardware” warnings I mentioned earlier). Click [Continue Anyway]:

At this point I recommend closing all the dialog boxes related to the setup. Finally, remove and re-insert the memory stick into your USB port and you should find that the extra partitions on the stick are accessible. In the worst-case scenario, you might still need topartition the diskhowever the hard part is over. 🙂