[HowTo] Goblin Install on an ASUS Netbook

Background

This howto is for installing the openSUSE 11.1 version of Goblin (OpenSUSE Moblin (Goblin)) on a SHDC card installed on an ASUS 1000HE Netbook rather than installing direct onto the internal hard drive sda. The reason for this is the current Goblin install writes direct to sda!

It should also work on any system that has the atom or intel based cpu with ssse3 flag. This can be confirmed with the command;


$ cat /proc/cpuinfo |grep ssse3

flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts pni monitor ds_cpl est tm2 ssse3 xtpr lahf_lm

The target audience for this howto is intermediate+ and comfortable with command line applications and using the command line editor vi.

Also you are running as root user, SO, as always it’s recommended you backup any important data before using this howto.

It’s also recommended to print out a copy of this so you can make notes etc during the install.

Requirements

  • SHDC Card 8GB or larger
  • openSUSE linux install on sda

Installing the image to the SDHC card (sdb)

  • Create a work directory and download opensuse-11-1-moblin.i686-2009-10-08.install.raw image dated 08-Oct-2009, md5sum and check.

$ wget http://forgeftp.novell.com/moblin/raw/opensuse-11-1-moblin.i686-2009-10-08.install.raw
$ wget http://forgeftp.novell.com/moblin/raw/opensuse-11-1-moblin.i686-2009-10-08.install.raw.md5
$ md5sum -c opensuse-11-1-moblin.i686-2009-10-08.install.raw.md5
opensuse-11-1-moblin.i686-2009-10-08.install.raw: OK

  • Change to root user and cd to the download location.

$ su -
Password:
# cd {your download/work directory}

  • With a raw image to mount you need to determine the offset to mount, to do this first determine the geometry.

# sfdisk -l -uS opensuse-11-1-moblin.i686-2009-10-08.install.raw

Disk opensuse-11-1-moblin.i686-2009-10-08.install.raw: cannot get geometry

Disk opensuse-11-1-moblin.i686-2009-10-08.install.raw: 178 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
opensuse-11-1-moblin.i686-2009-10-08.install.raw1   *        63     96389      96327  83  Linux
opensuse-11-1-moblin.i686-2009-10-08.install.raw2         96390   2859569    2763180  83  Linux
opensuse-11-1-moblin.i686-2009-10-08.install.raw3             0         -          0   0  Empty
opensuse-11-1-moblin.i686-2009-10-08.install.raw4             0         -          0   0  Empty

  • The image we want is on the second partition, therefore the offset is 96390 x 512 which calculates to 49351680. We also need to create a temporary mount point;

# mkdir /tmp/raw
# mount -o loop,offset=49351680 -r opensuse-11-1-moblin.i686-2009-10-08.install.raw /tmp/raw/
# ls /tmp/raw/

config.usbclient  lost+found  opensuse-11-1-moblin.i686.gz  opensuse-11-1-moblin.i686.gz.md5

  • The install image (raw format) is in the gz file which needs to be extracted, you can use file-roller or similar application to extract, or from the command line;

# gunzip -dc /tmp/raw/opensuse-11-1-moblin.i686.gz > opensuse-11-1-moblin.i686-0.0.2.raw

Preparing the SHDC card

  • Unmount and remove any existing partitions on sdb, for example;

# umount /dev/sdb1
# fdisk /dev/sdb

The number of cylinders for this disk is set to 19165. There is nothing wrong 
with that, but this is larger than 1024, and could in certain setups cause
problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 7948 MB, 7948206080 bytes
81 heads, 10 sectors/track, 19165 cylinders
Units = cylinders of 810 * 512 = 414720 bytes
Disk identifier: 0x1cbaa775

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       19166     7761888+  83  Linux

Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disk

  • Now use the dd command to byte copy the image to sdb and label the partition

# dd if=opensuse-11-1-moblin.i686-0.0.2.raw of=/dev/sdb
7137280+0 records in
7137280+0 records out
3654287360 bytes (3.7 GB) copied, 943.812 s, 3.9 MB/s

  • I suggest you go have a break as it takes ~10 minutes to copy then you can label the partition.

# e2label /dev/sdb1 Goblin

Preparing for initial boot and install

  • First we need to add an entry to the main system (eg openSUSE) grub menu to load the Goblin menu, by editing the /boot/grub/menu.lst and adding the following entry;

# vi /boot/grub/menu.lst

###Don't change this comment - YaST2 identifier: Original name: moblin###
title openSUSE Moblin Edition
    root (hd1,0)
    configfile /boot/grub/menu.lst

  • Write and save the above changes.

  • There needs to be a modification to the Goblin grub menu for the inital boot (and to clean up so SLE leftovers), so mount the device. The easiest way is to unplug and replug the device so hal automatically mounts. This method is prefered as the patching is pointing to this. It should remount as /media/Goblin.


--- /media/Goblin/boot/grub/menu.lst	2009-10-08 13:43:49.000000000 -0500
+++ /media/Goblin/boot/grub/menu.lst.orig	2010-01-16 23:09:37.000000000 -0600
@@ -1,13 +1,13 @@
 color cyan/blue white/blue
 default 0
 timeout 10
-gfxmenu (hd0,0)/boot/message
+gfxmenu (hd1,0)/boot/message
 title openSUSE_Moblin_Edition_[_OEM_]
- root (hd0,0)
+ root (hd1,0)
  kernel /boot/linux.vmx vga=normal loader=grub splash=silent  showopts
  initrd /boot/initrd.vmx
 title Failsafe_--_openSUSE_Moblin_Edition_[_OEM_]
- root (hd0,0)
+ root (hd1,0)
  kernel /boot/linux.vmx vga=normal loader=grub splash=silent ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off 
  showopts
  initrd /boot/initrd.vmx
--- /media/Goblin/boot/grub/menu.lst.custom	2009-10-08 13:37:20.000000000 -0500
+++ /media/Goblin/boot/grub/menu.lst.custom.orig	2010-01-17 00:04:15.000000000 -0600
@@ -1,11 +1,11 @@
 timeout 0
-gfxmenu (hd0,0)/boot/message
-title _SLED11 Moblin Edition_
- kernel (hd0,0)/boot/vmlinuz root=/dev/sda1  vga=normal splash=silent fastboot quiet rw rootflags=data=writeback showopts
-
-title _SLED11 Moblin Edition_ - bootchart
- kernel (hd0,0)/boot/vmlinuz root=/dev/sda1  vga=normal splash=silent fastboot quiet showopts rootflags=data=writeback init=/sbin/bootchartd
- initrd (hd0,0)/boot/initrd
-title _Failsafe -- SLED11 Moblin Edition_
- kernel (hd0,0)/boot/vmlinuz root=/dev/sda1  vga=normal splash=silent showopts rootflags=data=writeback ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off
- initrd (hd0,0)/boot/initrd
+gfxmenu (hd1,0)/boot/message
+title _openSUSE 11.1 Moblin Edition_
+ kernel (hd1,0)/boot/vmlinuz root=/dev/sdb1  vga=normal splash=silent fastboot quiet rw rootflags=data=writeback showopts
+ initrd (hd1,0)/boot/initrd
+title _openSUSE 11.1 Moblin Edition_ - bootchart
+ kernel (hd1,0)/boot/vmlinuz root=/dev/sdb1  vga=normal splash=silent fastboot quiet showopts rootflags=data=writeback init=/sbin/bootchartd
+ initrd (hd1,0)/boot/initrd
+title _Failsafe -- openSUSE 11.1 Moblin Edition_
+ kernel (hd1,0)/boot/vmlinuz root=/dev/sdb1  vga=normal splash=silent showopts rootflags=data=writeback ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off
+ initrd (hd1,0)/boot/initrd

  • Copy and save the above as goblin.diff and then patch using;

# patch -p0 < goblin.diff

patching file /media/Goblin/boot/grub/menu.lst
patching file /media/Goblin/boot/grub/menu.lst.custom

Booting the Goblin image

  • Restart the system and select the previously added grub menu item “openSUSE Moblin Edition”

  • Now select the Goblin grub item “openSUSE_Moblin_Edition OEM ]”.

  • It will now run through and initial configuration including language selection for the sdb drive and create a swap partition on the SHDC card. Once this is completed the system will reboot so you need to repeat 4.1

  • At this point you need to edit the grub menu as the kiwi temporary install is pointing to sda. So press the esc key to stop the boot and enter the grub edit mode and edit (press e) the two entries (hd0,0) to (hd1,0) and press the b key to boot and commence the next part of the install.

  • You will now be presented with a GUI routine to select your language, keyboard layout, time/date and root password and all going well into the default Goblin desktop (Gnome LiveCD user linux).

  • At this point I’m sure you will want to have a look, but I suggest finishing off as there are still a few items to edit (eg /etc/fstab) that I found during the preparation of this howto. Just press the power button and it will ask if you wish to turn off.

Finishing up

  • Start the system and boot into your openSUSE install to edit the Goblin fstab to point at sdb1. If you want to use sda swap, then modify as required to point at your system swap partition.

# vi /media/Goblin/etc/fstab

Here is the initial partition information;


/dev/sda1 swap          swap    pri=42          0 0
/dev/sda2 /             ext3    defaults,relatime,data=writeback        0 0

Modify / to point at sdb1. I changed my swap, yours will be different, so adjust as required;


/dev/sda11 swap         swap    pri=42          0 0
/dev/sdb1 /             ext3    defaults,relatime,data=writeback        0 0

  • Correct the device map to point at the SHDC card by editing the following file and changing (hd0) to (hd1).

# vi /media/Goblin/boot/grub/device.map

Optional steps

  • I found an error in the RC_LANG entry for my system and adjusted to be correct;

# vi /media/Goblin/etc/sysconfig/language

I editied RC_LANG=“en_US.UTF-8.UTF-8” to RC_LANG=“en_US.UTF-8”

  • If you use the sda swap, you may wish to resize the SHDC card, unmount the device and use the YaST partitoning tool to delete the swap sdb2 and resize sdb1.

# umount /dev/sdb1
# yast2 disk

  • Since I multiboot, I wanted to use my user name (UID 1000) instead of the LiveCD user, so when you boot into the Goblin system, use ctrl+alt+F1 to get to a console, login as root and run;

# init 3

Note: You may have to press ctrl+alt+F1 again to get back to the console.

  • Now run the command;

# yast users

This will start the ncurses version and modify the user name from linux to your desired name, login name and password. Say yes to changing the home directory, save, quit and reboot the system to ensure the linux user is cleared out;


# reboot

I also recommend not to update at this point as some things break… go setup your ethernet/wireless and enjoy :slight_smile: :slight_smile:

[RIGHT]Release: 0.1-draft Date: 01/20/2010[/RIGHT]