May 26, 2008

Installation without YaST

With 96MB of RAM, Linuxrc will not start on 11.0 (RC1). So I decided to exploit the image based installation, and not to use YaST at all for a change.

The target machine has dual boot and I am logged on the other system via the network, so I could paste this all in. Fasten your hats...

Update: Planet SUSE is eating the dollar variables :-( See the original post at Blogspot for the real thing.

Target partition:
# mkfs.ext3 /dev/hda1
# mount /dev/hda1 /mnt

A flash drive with images and kernel:
# mount /dev/sda1 /media
# cd /media/misc

Note I used unlzma beforehand because the target machine is way slow for that
# du -m *
5 base-i386.tar
12 base-meta-i386.tar
527 common-base-i386.tar
22 kernel-default-2.6.25.4-8.i586.rpm

Unpack!
# for i in *.tar; do dd if=$i bs=1M | tar -C /mnt -xf -; done &

While it is running, watch the progress:
# pkill -USR1 -x dd
...
552202240 bytes (552 MB) copied, 709,291 s, 779 kB/s

# cp kernel-default-*.i586.rpm /mnt/tmp

Before installing the kernel, we must do some setup so that the post-install script works.

# for i in dev proc sys; do mount --bind /$i /mnt/$i; done

# chroot /mnt
Now I use ## to mark that we are chrooted in the target system.

Modify partitions as needed.
Also see ls -l /dev/disk/by-id
## ROOT=/dev/hda1
## SWAP=/dev/hda4
## cat <<EOF > /etc/fstab
$ROOT / ext3 acl,user_xattr 1 1
$SWAP swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
EOF

You probably don't need to set this one and the others starting with FIX_

## FIX_BOOT=acpi=force
## GROOT="(hd0,0)"
## cat <<EOF > /boot/grub/menu.lst
default 0
timeout 60
gfxmenu $GROOT/boot/message

title openSUSE 11.0
root $GROOT
kernel /boot/vmlinuz root=$ROOT resume=$SWAP vga=787 $FIX_BOOT
initrd /boot/initrd

title Failsafe -- openSUSE 11.0
root $GROOT
kernel /boot/vmlinuz root=$ROOT ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=787
initrd /boot/initrd
EOF

Put GRUB to MBR
## GDEST="(hd0)"
## cat <<EOF > /boot/grub/device.map
$GDEST /dev/hda
EOF

## cat <<EOF > /etc/grub.conf
setup --stage2=/boot/grub/stage2 $GDEST $GROOT
quit
EOF

## sysconfig() { sed -i -s "/^$2=/s/=\"/=\"$3/" /etc/sysconfig/$1; }

I also need this. You probably don't
## FIX_MODS="ide-generic ide-core"
## sysconfig kernel INITRD_MODULES "$FIX_MODS"

I don't know whether these 2 are strictly necessary
## sysconfig bootloader LOADER_TYPE grub
## sysconfig bootloader LOADER_LOCATION boot

## rpm -Uhv /tmp/kernel-default-*.rpm
It will get the resume device wrong (according to *current* swap partition), but it seems harmless.

## grub-install

## passwd
## chkconfig SuSEfirewall2_init on
## chkconfig SuSEfirewall2_setup on

## exit
# reboot

BTW, I am fed up with the Blogger editor. Can I use an offline one so that I don't have to change blog hosting?

4 comments:

Martin Vidner said...

Related material: Installation with Little Memory.

Anonymous said...

What hardware specs are you running? I was able to install Beta3 on a PowerMac6500 with a 603ev/250 and 128MB RAM, but I had to setup swap space to do it.

Anonymous said...

> BTW, I am fed up with the Blogger editor.
> Can I use an offline one so that I
> don't have to change blog hosting?

If you're using Firefox, I recommend the extension "It's All Text!".

Martin Vidner said...

> I recommend the extension "It's All Text!".
Thanks, but that seems to just start an external editor for a text box. I meant the HTML formatting behavior (whitespace mangling, tag mangling).

It seems I will use OpenOffice + tidy + xmllint.