2009-08-28

Open SUSE failure as well

After a series of failures with debian, ubuntu, gentoo and fedora to install over my old Gnu/Linux installation I give openSUSE a try. I have never tried this distribution before.

I download OpenSUSE 11.1 x86_64 DVD.
Boot up. Afer som time I get a blue screen saying file:/var/adm/mount/boot/x86_64/root: SHA1 sum wrong. If you really trust your repository, you may continue in an insecure mode.

Well I don't trust the bittorent download of Open-SUSE. But what is there to loose? I like living on the edge.

Then it says make sure CD1 is in your drive. Three times. But I have a DVD. The the installation fails. Nothing strange, I am used. Just try another time again.

It fails. It seems I now can select a network install. Now I just need an IP address. Sorry it was impossible to find, or didn't work. It was not http://download.opensuse.org/distributions/11.1/repos/oss/

I reboot, this time check the installation media first. Actually there was a problem in a sector. But I had the Mac verify the disc just recently when I wrote it.

Also for fun I try the firmware test. I find a memory hole, and some other things.

Reboot. Now I try to change to http instead of DVD as source. I select server download.opensuse.org and directory distributions/11.1/repos/oss/. Didn't work. I reboot and select http://download.opensuse.org and /distribution/11.1/repos/oss/
note the removed s in distribution. Didn't work. It seems it should be repo not repos. BTW how hard can it be to have this as a default?

And it didn't work with /distribution/11.1/repo/oss/ either. I am dropped into the text based installer. I try http based install once again. This time by pinging download.opensuse.org and putting in the real ip adress as numbers as the ip address of the server. It marches on!!!

It looks really good. Green and grey. Not Mac not Windows, just plain good looking.

I deselect use automatic configuration, select new installation.

The map to select location is even prettier than Fedoras. They focus on the important stuff.

I select Gnome as desktop for a change. They also have Xfce which I usually use.

Now they suggest to delete my partitions. Instead I choose Edit Partition Setup. I din't understand anything about my drives. I click back and "LVM based" before Edit Partion Setup. They have a button "Import mount points". And it finds an old /etc/fstab on /dev/vg1/root. Presumably leftovers from a failed Fedora install. My "real" old fstab was wiped out by Gentoo.

It takes some time to edit the paritions. It adds or picks up a volume group /dev/system I have not seen before. Anyway it seems it won't format any discs so here I go. yes, they warned me that the disk wasn't empty.

Now I am presented with a nice overview of the installation settings and can edit them again. This is the best I have seen for an OS installation.

Now the installer starts. I almost immediately get "initializing the target directory failed.". No information why it failed though. That is not user-friendly. I like the pretty map, but a little info here would have been even more appreciated.

Time to give up and go to bed. Now I have ran out of Gnu/Linux distributions to try I think.

2009-08-27

Failed Fedora 11 attempt

After Debian failed and Ubuntu failed to install and Gentoo required way too much of my time, in a way that is also "failing" to install, I am now giving Fedora a shot. Previously I have tried CentOS on a server and have been happy with it, it just runs Xen troublefree.

I want the 64 bit version, and I find a torrent on the fedoraproject.org site. I didn't know I had a torrent downloader on my Mac, but it seems that the Opera browser has one built in. Very nice.

Booting shows a black screen, with a white line growing at the bottom. More white line fever. However soon it seems nicer, it starts a good looking X-session. I get a message a hard disk is failing as a speech bubble at the top right of the screen. When I click it I get the palimpset disk utility. It seems the 160gb drive has bad sectors. I can select self-test to do an ATA SMART self test, I choose a short test. It seems OK but it has some bad sectors. I have just fixed a bad disk using ddrescue so I know how to fix it some day, I will blog about it soon.

Anyway, the palimpset disk utility seems nice, I can see my disks even the LVM ones.

I click on the Install to Hard Drive icon on the screen. This is not a text based installer as I have tried earlier. It is a graphical "wizard" resembling Windows and Mac OS. It feels refreshing after the Gentoo experience. Choosing my location is nice, just click on the world map.

It complains about a weak password, but lets me continue anyway. That is nice.

Now I get the option to partion the hard drive. One option is "Replace existing Linux system". Wonder what that means? Reformat everything including /home or just overwrite system files? I select it and review and modify partioning layout. Ok, it seems it meant blow everything because they have a slightly other LVM setup and want to install ext4 on it. I go back.

Now I choose a "Custom layout", and see my discs. I have to scroll up and down to see my whole setup, but I can select sdc, then click edit and select /boot as mount point.
I then click on my vg1/root device, click edit. I don't see how to select a mount point. But, if I click on the "root" part in the list of logical volumes in the popup window, I can select / as mount point. I then get a long warning about using a pre-existing partition without formatting it. But, they also say "However, if this partition contains files that you need to keep such as home directories, then continue without formatting this partition". Thanks for this, it seems I am not the first one seeing this need.

I now have a xfs lvm root and an ext3 boot, that is good enough, the other disk I might add later or mount manually. I click continue.

Then I get the message: your / partition does not match the live image you are installing from. It must be formatted as ext4. Damn! My guess is that they haven't support for xfs on the live-cd. But, I feel fedora is promising, so I download the 4Gb DVD instead. Maybe it is more complete?

Now, the DVD installer didn't complain about XFS. I select to have the bootloader on the /boot partition. I deselect "Office and productivity", trying to start with as small install as possible, then see what I want to add later.

Finally it is time for reboot. I think this will work...

No. Just a black screen, no choice of loading linux (grub or lilo). Can it be that I selected the boot disk for the bootloader? I will try another install using the default Fedora suggested, on sda1.

No that didn't work. I mess around with different start disks too no help.

Now, I try yet another time. This time I select to reformat my little 94 MB sda1 partition (no mount point) and also the sdc1 (/boot mount). And the 2 Gb swap I have on LVM.
Now I notice that the boot loader device option also list the boot order I just selected in Bios. And I can change it! I select the Master boot record of dev/sdc, select sdc as the first BIOS drive. Thats the 80GB ext3 boot disk I want.

I also notice I can Edit the Boot loader, so for the first time I press edit. And an Exception shows in Anaconda. I even have the option to send it to redhat. But they require an account, so they won't get my exception. I thought this information could be interesting even if I was anonymous.

It seems I need to restart the installer again. But I wasn't really interested in changing The boot loader menu name so I will give it one more try. This is the last attempt before I try Open Solaris. It have taken more than a day now.

Ok. It failed. The exception is in /usr/lib/anaconda/booty/x86.py line 154 in writeGrub. IOError: no such file or directory /mnt/sysimage/boot/grub/grub.conf

But OpenSolaris doens't support xfs. So I give Fedora one more try. This time it really seems that it doesn't pick up the boot order I just selected in BIOS. Anyway, I install it as MBR on sda. Then I will change boot order in bios. But the installer crashes yet another time. This time it is time to give up. I see no good option. Maybe it is time to wrestle with Gentoo. Or buy a big harddrive and dump my home directory, it should be readable from a live-CD.

2009-08-26

Gentoo attempt

After ubuntu failed to upgrade, I tried to install debian and then ubuntu but failed. Now it is time to try Gentoo, this is my first attempt ever with Gentoo. I downloaded the 20090813 daily installer of Gentoo, as suggested on their page. Booting made a command prompt appear.

No emacs, but vi. This does not start good.

There are some messages. Check /etc/kernels/kernels-config-* for kernel configuration.
A suggestion to type "links http://www.gentoo.org/doc/en/handbook/handbook.xml".

That starts a textbased browser. I can navigate with up and down arrow and enter. I get to the Gentoo AMD64 Handbook.

Lets skip step 1 to 4, I already have disks. And go to 5 installing the gentoo installation files.

It tells me to check the computer date using the date command. But where is the command prompt? Through esc>File os shell I can open it. I type date and it looks ok. Then exit to get back to "links". Now they want us to surf to a gentoo mirror and download a stage3 tarball. Using a textbased browser. Is this a rite of passage for nerds? Haha: I pass.

Now I find out how to navigate "links". Ctrl-N and P to scroll. Easy and nice. That was my first guess but I managed to press caps-lock instead of control.

tar unpacking instructions:
tar xvjpf stage3-*.tar.bz2
Apparently the 5 letters are very important. And five chunks is actually the upper limit of what a human can hold in his short-term memory. An average human, I needed to go back and forth some times. I suddently remembered that I could switch to a prompt by ctrl-alt-f1 and go back with ctrl-alt-f3, that makes everything easier.

Ok, now I should download a portage snapshot. Done.
Then,
tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr

With capital C, no trailing slash on usr

But I seem to be getting no space left on the device. And this is/should be on the ramdisk? I can remove the stage3 tar I guess. I try that. It doesn't help.

Ok, it seems I shouldn't be on the ramdisk.
I should mount my old drive on /mnt/gentoo. And my boot disc on mnt/gentoo/boot

fdisk -l shows my old LVM partitions. Some googling and I found this info:
. By now I have been listeing to Louie Louie covers since ubuntu failed. I think I like Thee Headcoats version of Louie Louie best.

To mount LVM i do:
vgchange -a y
lvscan

It shows the lvm disk, so I can mount it. First i mv /mnt/gentoo /mnt/prev
Then mount /dev/vg1/root /mnt/gentoo

It starts a xfs recovery and won't mount. However I saw no disk problems when I booted up ubuntu some hours ago. Anyway I need to do a dangerous xfs_repair -L /dev/vg1/root it seems. I have now listened to 29 versions of Louie Louie and have not come very far at all I think. Time for sleep after the great Iggy and the Stooges version. So far I think Gentoo is the Iggy Pop of linux distros. Thin and hard.


Then they want me to edit build options. This is what I pick from skimming through the manual.
march=x86_64 need to see if it is called that?
-O2 for default optimization
-pipe to speed up compilation

There should be a file in /mnt/gentoo/etc/make.conf.example, but there isn't so I won't select the march option. No there was a file, but elsewhere.
I add the option MAKEOPTS="-j3" because I have a dual-core.

Now time to install.
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync --quiet

Change locale to en_US.UTF-8 UTF-8 by editing /etc/locale.gen
then run locale-gen

My god this never ends. I skip select timezone.
emerge gentoo-sources

It is late, I don't want to manually configure the kernel. Instead genkernel.
emerge genkernel
genkernell all

Oops it seems I forgot to mount a drive on boot/
I do that, ctrl-c genkernel all, then run genkernel all again
But I am not sure it worked.
Anyway now I am going to sleep.

good morning. It seems it worked, there are some files in (chrooted) /boot

Now they want more editing. I am getting tired of the nano editor, I want emacs or a clone. But it seems that some guys at Gentoo refuses to add it, despite the emacs team volunteering to trim it down to a small size. This has been wanted since 2005 and emacs is one of the two big editors, consider this blog-post bad publicity for Gentoo if you want another argument to add emacs to the minimal-cd.

Ok, now you can edit a file and specify modules for the system. But I don't know what I should have, and there are no defaults suggested in the documentation. So I skip that right now. Maybe the modules are added dynamically later anyway?

Ok time to edit the /etc/fstab.
Shit, Gentoo has overwritten it with a default. My old setup with LVM and things is gone. I can't be the only one trying to do a reinstall over an old disc, so it wouldn't be too much to ask that the installer makes a backup copy of the old fstab. That is feature request.

Now this is too much to me. I scroll down to see the options, there are a lot of steps left. I haven't even started to configure X-Windows. I don't enjoy messing with Linux, I like programming. I give up. I might make another attempt if Fedora also fails, but that is the next alternative now.

March ör die you Ubuntu installer

Since debian didn't work well I try Ubuntu 9.04 AMD64 alternate installer. I notice there is a rescue a broken system option, exactly what I want lets try it. Now I get to the options, execute a shell or reboot. That won't repair my system. I look for the "Repair system using crowd-sourcing and AI and a live chat connection with skilled people" option. Couldn't find it. Let's try reboot, after all it usually fixes windows.

After the reboot I try the installer again, this time to install instead of rescue.
The installer looks exactly like debians, and I choose the same disc options.
I get a slightly better message explaining that files will be overwritten and I should back up. Then it says it is going to write partition table for some swap partitions, and goes blue. But not like a windows bluescreen, this bluescreen has no black text describing the error. Instead it has an white line at the bottom of the screen. I come to think of Motorhead and the book white line fever, and turn on Ace of Spades. What a classic! And I find out that Lemmys voice makes their covers of Breaking the Law and God Save the Queen absolutely brilliant. Then the bluescreen turns to red.

Partition disks. The installer needs to remove operating system files from the install target but was unable to do so. The install cannot continue. Go back or contine.

I click continue. March ör die. Then I get back to the partitioner. Try another time. Then I try to reformat the boot disk. Motörhead does another cover Louie Louie. Not as good as the Sonics but nearly as good as Paul Revere and the Raiders. There are enough Louie Louie covers to entertain me while Gentoo downloads. I come to think an installer should be like Motörhead. Just go on and on and do it good.

Yet another failed Debian installation

Since ubuntu wouldn't upgrade I decided to try debian once again.

This is the report about installing Debian 5.02 over my old Ubuntu Hardy.

I downloaded a CD image with XFCE and LFCE on, AMD64.

The first interesting part of the installation is the partitioon table. I had a messy old system with lots of drives. I selected an unusued 80gb drive as a boot partition, since I have had problems with a too small boot partition earlier. I also reselected my big LVM partition as the root system, but left it as it is instead of reformating it.

The installer then asks me if I want to proceed with an unclean disk which has an old system on it. That is exaclty what I want, I want to preserve my data.

Then comes a Debootstrap warning.

Failure to run: chroot /target/ dkpg --force-depends --install /var/cache/apt/archives/base-passwd_3.5.20_amd64.deb var/cache/apt/archives/base-files_5lennt3_amd64.deb

Base system installation error: the debootstrap program exited with an error (return value 1).
Check /var/log/syslog or see virtual console 4 for the details.

Then I get back to the installer.

I can open a shell as the last option in the installer, and i check the syslog with tail -200 /var/log/syslog | more.

dpkg seems to complain about pre-dependency problem: base-files depends on awk. But it continues anyway. Then there are pre-dependency problems for base-passwd, which depends on libc6 > 2.7.1 which is not installed.
Last it complains about a bad sector on hda, but who cares I am not installing on hda, so that can't be the problem. I guess the problem is that there is a problem with the debian installer. Surely it should be able to install over the existing system without these dependency errors. Maybe it picks up some settings from the old system. But it shouldn't do that so early in the installer, it smells really bad.

Now I can't keep track of which version, Ubuntu or Debian has failed most times. I am really temted to switch to another gnu/linux. I won't overwrite my old data, if I can't find a gnu/linux installer that works I'll switch to a hackintosh.

2009-08-24

Fixing crashed harddrives for friends

Sometimes a friend comes with a crashed harddrive and wants help. If they ask nice I will try to help them. This is one case. First I thought it was a windows problem, but after my recovery the end the drive really died so it was a drive problem

First I tried dd, with sync,noerror option. Everything seemed ok. But it did not transfer enough (I tried to verify with rsync in dry-run mode). I now think dd is not proper tool for this. There are people advocating it. But the problem is that it is not designed for rescuing operations. There are specialized tools for that, that try more than once on failing parts of the drive.

What you need: An empty usb drive at least as big as the failing harddrive. An iso-file of System Rescue Linux CD

Burn the iso file to a CD. On Mac use the Disk tool.

Boot, turn on the computer.

(not needed but if you want: lsusb -v to see usb devices)

fdisk -l to see drives. Find out who is the failing drive and which is the USB drive. Myabe you see the name of the harddrive manufacturer?

Take note of their "location", what is below /dev/ . It could be /dev/hda1 or /dev/sda1 for the failing drive.

You are going to use ddrescue (The gnu version which is not the same as dd_rescue. Known as gddrescue on debian). Reads bad sectors more slowly, should be better than most alternatives.

the command is going to be:

ddrescue infile outfile logfile

But first you will need to know the infile and outfile.

The logfile can be any name.

I suggest: /logfile

It is used by ddrescue if you need to restart it, then it can continue where it was instead of starting over. The logfile will be stored on a RAM-disk when you run the systemrescue CD. What it means is that you do not need to worry about it overwriting any of your data, and that if you turn off the computer the logfile will be gone and you will have to start over.

Note: Make sure you know what is infile and outfile, don't mess up the order.

This is the only command you will need to rescue your drive if you are lucky:

ddrescue -v /dev/sda /dev/sdc /ddrescuelog

However I suggest (see below): ddrescue -v -d -c 10 /dev/sda /dev/sdc /logfile

Note that this is for my example. Don't just use it without knowing which is your hd and which is your usb drive. You need to get infile and outfile right.

Starts good but slows down. The second night it copies less than 2 GB. More than a month left to finish.

ctrl-c then restart with new options -d and -c 10 (suggested by their mailing list)

I didn't notice the speedup at first, but after some hours it had analyzed the full 160GB. Then a new phases started "trimming error areas". And the errsize starts decreasing fom 49464 kb and 1873 errors down to, well after a day 4461 kb and 1933 errors. The errsize is decreasing slowly slowly...

After another day, the errsize is down to 3090kb and errors up to 1974 but the message has changed to "Splitting error areas" so I guess we are close...

Yes! Finished. Rescued 160038 MB errsize 3077kB and 1986 errors.

I turn of the laptop that has been turning me mad with its sound. Ooops, I forgot to verify the copy. It would be interesting to do that with rsync --dry-run. So I turn on the computer, but the HP bios reports: SMART Hard Drive detects imminent failure. Please backup the contents of the harddrive and run HDD self test in F10 setup. OK, but I can't boot into the live-CD because of this message, so I can't backup the contents of the harddrive. And doing the self-test just results in a message that it fails. But how do I get to the live-CD to do my own investigation? I can't.

But when I plug in the USB copy into my Mac and look at the directory with pictures, everything seems ok. Previously I used plain dd with noerror option, and then the pictures looked like they were there but wouldn't open. So my guess is that ddrescue has done its job! Great.

Here is another link if you want to read more.

2009-08-13

Firefox 3.5 Mac Os X segmentation fault

To my surprise, my new Firefox 3.5 on Mac OS X suddently stopped working.

/Applications/Firefox-3.5.app/Contents/MacOS $ ./firefox
./run-mozilla.sh: line 399: 2036 Segmentation fault "$prog" ${1+"$@"}


I don't remember the exact version, but I downloaded Firefox 3.5.2 again and it has worked since. I haven't seen this reported elsewhere by a web search.