Puppy Linux on a thin profile, cdrom-less Toshiba Portege laptop
Puppy Linux is a very lightweight Linux distribution very suitable for older laptops. A customer called me and asked about installing Linux on his recently bought off Ebay Toshiba Portege. He also wanted to replace the hard drive with a Compact Flash with an IDE adapter. Another problem was that the laptop was designed to be so lightweight and small that it didn’t even had a CDROM drive. In this post I will describe how I installed Puppy Linux over the network, using PXE, LTSP and my trusty dev box which sits under my desk, running Ubuntu Linux.
The laptop cannot boot from a fixed drive, because it does not have a CDROM or a floppy. But… it can boot from the network with PXE! I can even “send” the operating” system over the network and have a fully working machine, even without a hard-disk. In Ubuntu, this is pretty easy, as documented here: https://help.ubuntu.com/community/UbuntuLTSP/LTSPQuickInstall
You basically have to do just:
sudo apt-get install ltsp-server-standalone openssh-server
sudo ltsp-build-client
Activate the LTSP shell on the client:
Do this on your “server” (I did this on my Ubuntu workstation):
Chroot to /opt/ltsp/i386. (chroot /opt/ltsp/i386)
Copy /usr/sbin/sshd to /opt/ltsp/i386/usr/sbin.
Copy /etc/init.d/ssh to /opt/ltsp/i386/etc/init.d
Duplicate the symlink structure in /etc/rc*.d to the corresponding directories in the lstp tree so that ssh will start on boot.
Edit passwd and shadow in /opt/ltsp/i386/etc and add the entries for sshd from the files of the same name in /etc/
Create an appropriate set of host keys with ssh-keygen.
Or do it the smart & easy way (which I didn’t think of):
apt-get install ssh (while you are chroot-ed).
Got this idea from https://help.ubuntu.com/community/HowToSetupLTSPDevelEnvironment
Run passwd to set a root password in the local /etc/passwd shadow. (passwd root)
OR
Add the user debug. (adduser debug)
Set a password for the debug user (passwd debug)
Add debug to sudoers (use visudo to see de sudo config file), add debug to the group that can sudo.
Now, login to your LTSP client (my Toshiba Portege):
ssh debug@192.168.0.250
(it may take a long time before you get a prompt, it’s because you don’t have a DNS, just wait for about 30 seconds for the DNS request to timeout)
Then on the box, type the folowing commands:
sudo cfdisk
Here you delete all partitions, and create a 1 gig partition on hda and mark it as bootable and make a extended partion and for your swap partition.
After that, create the filesystems:
sudo mkfs.ext3 /dev/hda1
sudo mkswap /dev/hda5
On the LTSP client the root filesystem is readonly, but you can write on /tmp. Tmp is a ramdrive device.
sudo mkdir /tmp/hda1
sudo mount /dev/hda1 /tmp/hda1
cd /tmp/hda1
sudo tar -xvf /srv/puppy.tar
puppy.tar is an archive of puppy linux.
sudo mv /tmp/hda1/media/hda1/* /tmp/hda1
sudo grub
You are now in the grub shell.
grub- root (hd0)
(choosing the first partition of the harddrive)
grub- setup (hd0)
you are installing grub in your hard drive MBR
you may want to install the boot loader on your bootable partition too (hda1): “setup (hd0,0)” does this.
grub- quit
Reboot your laptop and remove your ethernet cable so you can boot from the harddrive. You are done.
