Tiny Core Base > TCB Tips & Tricks

IBM ThinkPad 560Z Core Project Pentium II

(1/3) > >>

linic:
I read somewhere on the internet that old hardware does not die, it only gets more difficult to support over time.

I plan to post the workarounds I found to support the 560Z with Core Linux. There are links to the original documentation throughout my post. This is a digest of all the bits and pieces I found here and there.

I found this IBM ThinkPad 560Z PII Mobile 233 @ 300 MHz with 64 MB RAM years ago. The lid is cracked as if a brick fell on it, but all the rest is in a great condition. RAM can be expanded as there is a free slot, but the RAM itself is hard to find at a price that makes sense for this project.

According to the sticker under it, this 560Z was made in Mexico on 10/98, so October 1998. It is close to 25 years old now.

With this low quantity of RAM, I went with the Core version that has only a terminal.

The 560Z doesn't have a CD-ROM drive and I don't have an external floppy to connect to it. To workaround this, I'm using an IDE to USB adapter. That way I can more easily flash the drive with the image I want.

To make a working image to flash on the drive, there are steps in this other post about the ThinkPad 600X: http://forum.tinycorelinux.net/index.php/topic,22583.msg170008.html#msg170008

I made my image by connecting the IDE drive to my 2012 laptop running Debian 12  and using the command
--- Code: ---sudo dd if=/dev/sd<replace> of=core14.dd conv=sync,noerror bs=512M count=3 status=progress
--- End code ---
You'll need to find your drive with
--- Code: ---sudo fdisk -l
--- End code ---
and you'll need to adapt the count=3 if you chose different partition sizes than me.

Once you have your image, you can either write it to another IDE drive or go on and use the current IDE drive in the 560Z. Check that it boots and check
--- Code: ---sudo ifconfig eth0
--- End code ---
to see if the network card gets its IP address.

For an unknown reason, the 560Z doesn't always gets its IP address on its own after rebooting. When it doesn't find its IP and you know your network you can use the following commands:

--- Code: ---sudo ifconfig eth0 192.168.0.180
sudo route add default gw 192.168.0.1
sudo cat /etc/resolv.conf
sudo echo "nameserver 1.1.1.1" > /etc/resolv.conf

--- End code ---
Adjust the IP addresses here to your network configuration! ifconfig sets a static IP, route adds the default gw which is used to get to addresses on the internet. cat /etc/resolv.conf shows you if you have a name server/DNS server to resolve hostnames. In my case, it was empty, so I added 1.1.1.1 which is the cloudflare name server. Feel free to replace with another one you wish to use. I read here (https://www.cyberciti.biz/faq/howto-linux-bsd-unix-set-dns-nameserver/) that you can add up to 3 name servers.

Next thing I adjusted is the resolution. vga=788 is good with the 560Z. I didn't find a way to edit the extlinux.conf while the 560Z is running so I did sudo poweroff disconnected the power cable and pulled the IDE drive out to connect it again to my Debian machine. Debian mounted the drive automatically and I went to /mnt/<replace with your mount point>/tce/boot/extlinux/ and then did a

--- Code: ---sudo vim extlinux.conf
--- End code ---
and changed the file to this (for context, I'm giving the whole file. Read on to see the exact lines I changed...):

--- Code: ---UI vesamenu.c32
MENU TITLE Tiny Core Bootloader
TIMEOUT 1

DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/core.gz
APPEND vga=788 syslog showapps tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" swapfile=UUID="a53d3aa0-1607-44a2-8c43-bf71d35edf59"

LABEL unknown
MENU LABEL Unknown OS
COM32 chain.c32
APPEND boot 1

--- End code ---
I changed this line:

--- Code: ---TIMEOUT 1
--- End code ---
which had value 100 to wait 10 seconds on the OS selection screen at bootup which I don't need as I always want to boot in Core Linux on the 560Z since it is the only OS.
I also changed this line:

--- Code: ---APPEND vga=788 syslog showapps tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" swapfile=UUID="a53d3aa0-1607-44a2-8c43-bf71d35edf59"
--- End code ---
Originally, right after the tc-install.sh I had this:

--- Code: ---APPEND quiet vga=normal syslog showapps waitusb=5 tce=sda1 waitusb=5:UUID="d39a00cb-d63f-470e-8c46-0bdbd1db2d6f" tce=UUID="d39a00cb-d63f-470e-8c46-0bdbd1db2d6f"
--- End code ---
I was confused why waitusb and tce= appeared twice so I went to the core book: http://tinycorelinux.net/book.html
It is pretty clear so search the flags and read the paragraphs they appear in you'll understand what's happening.
I tested and found out I didn't need waitusb=10 so I removed it. I initially thought that increasing waitusb would help my network adapter get its IP automatically, but after testing various values, it didn't improve that so I removed it and everything else was fine. I also removed waitusb=10:UUID="d39a00cb-d63f-470e-8c46-0bdbd1db2d6f" because my partition is on the IDE drive, not a USB drive.

I noticed tce=sda1 and tce=UUID="d39a00cb-d63f-470e-8c46-0bdbd1db2d6f" and the tce=sda1 is redundant see the Core book to understand why. I kept only tce=UUID=, but I changed the UUID to "3541ff21-9683-4df0-9ecd-a5a3fce0014c". Read on to know why.

You'll see I added swapfile=UUID="a53d3aa0-1607-44a2-8c43-bf71d35edf59", read the Core book to know more. Note that you may not need this. I partitionned my IDE drive this way:
1. First primary partition about 1 GB which has everything to boot Core Linux. UUID="d39a00cb-d63f-470e-8c46-0bdbd1db2d6f"
2. Second primary partition which contains most of the space of the IDE drive. UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c"
3. Third and last primary partition which is formatted as a swap partition. UUID="a53d3aa0-1607-44a2-8c43-bf71d35edf59"
I partitioned the drive using gparted in on Debian machine.

Once this was all done, I inserted the IDE drive again in the 560Z, plugged the power and turned it on. All was working great so went on.

If you are curious to look at the swaps usages:

--- Code: ---cat /proc/meminfo
cat /proc/swaps

--- End code ---
I found those commands here: https://unix.stackexchange.com/questions/23072/how-can-i-check-if-swap-is-active-from-the-command-line

I wanted to test the internet connection more so I tried curl. Get it using:

--- Code: ---tce-load -wi curl.tcz
--- End code ---
You'll see it installs also curl.tcz, ca-certificates.tcz and openssl-1.1.1.tcz. That's nice as it looks like https will work well! Once the install completes, you can try to curl some websites you care about:

--- Code: ---curl google.com/
--- End code ---
will print some html formatted text to the terminal. That command sends an HTTP GET to the website you give it. It can do more than that. You'll see in its manual.

Next, I wanted tmux as 1 terminal is good, but n terminals is great!

--- Code: ---tce-load -wi tmux.tcz
--- End code ---
Once the install completed, I tried to run tmux and it told me it couldn't start because the locale wasn't set correctly because the locale was set to ANSI-something-1968. So by reading this post http://forum.tinycorelinux.net/index.php/topic,23825.0.html, the Core Book and http://tinycorelinux.net/14.x/x86/tcz/getlocale.tcz.info I decided to run

--- Code: ---tce-load -wi getlocale.tcz
--- End code ---
and once it was installed I ran

--- Code: ---sudo getlocale.sh
--- End code ---
and then I was confused by this

--- Code: ---cp: can't stat '/tmp/mylocale.tcz': No such file or directory
md5sum: can't open 'mylocale.tcz': No such file or directory
Done. The extension is at /mnt/sda2/tce/optional/mylocale.tcz and in onboot.lst
du: /mnt/sha2/tce/optional/mylocale.tcz: No such file or directory
sh: bad number
Reboot with lang=xyz (for example lang=fr_CA.UTF-8) to start using this.
Press enter to quit.

--- End code ---
I found that /mnt/sha2/tce/optional/mylocale.tcz didn't exist. So I thought, meh, 64 MB of RAM even with the swap partition, maybe something goes wrong and the file doesn't get written. I turned off the laptop removed the IDE drive and put it in the 600X to run the getlocale.sh again. There it worked. So once that was done, I turned off the 600X and connected again the drive to my Debian to add the flag
--- Code: ---lang=fr_CA.UTF-8
--- End code ---
. Replace it with the locale you chose when running getlocale.sh if your following my steps. I put the drive back in the 560Z. When the 560Z finished booting, the locale got set correctly and tmux works now.

That's it for now.

Special thanks to Curaga for getlocale.tcz and to juanito, cheslavic and Nicholas Marriott for tmux.tcz

If anyone appears to know a place in Montréal, Canada where I could shop for a used and working 64MB RAM module (60 ns, non-parity, 3.3 volt, 144Pin EDO) under 20$ CAD I am interested.

polikuo:

--- Quote from: linic on August 13, 2023, 08:16:54 PM ---I didn't find a way to edit the extlinux.conf while the 560Z is running so I did sudo poweroff disconnected the power cable and pulled the IDE drive out to connect it again to my Debian machine.

--- End quote ---
Hi, linic.
Welcome to the forum.
You can edit the file directly with vi instead of vim.

--- Code: ---vi /mnt/sda1/tce/boot/extlinux/extlinux.conf
--- End code ---


--- Quote ---
--- Code: ---UI vesamenu.c32
MENU TITLE Tiny Core Bootloader
TIMEOUT 1

DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/core.gz
APPEND vga=788 syslog showapps tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" swapfile=UUID="a53d3aa0-1607-44a2-8c43-bf71d35edf59"

LABEL unknown
MENU LABEL Unknown OS
COM32 chain.c32
APPEND boot 1

--- End code ---

--- End quote ---
If you're sure that TC is the only system on your drive, remove the "Unknown OS" entry.
Syslinux automatically boot to default OS if there's only one option available.
This section alone will do. You won't need UI, MENU TITLE, TIMEOUT

--- Code: ---DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/core.gz
APPEND ...

--- End code ---


--- Quote ---I was confused why waitusb and tce= appeared twice
--- End quote ---
You probably filled in those value during the installation.
The later value will replace the previous, so it doesn't really matter.
The boot code waitusb tells TC to wait until the drive is visible to load extensions and the backup
Anything beyond that is irrelevant.


--- Quote ---You'll see I added swapfile=UUID=...
--- End quote ---
That's not exactly the way swapfile work.
The swapfile is the alternative when you forgot to make a swap partition or the size is too small.
It slower by nature and you have to manually make a swapfile, a file, for it to work properly.
Since you already have your third partition as swap partition, you can drop that line completely and let the kernel do its job.
BTW, you should reset the UUID value of your tce variable so TC won't have to figure it out itself.
To find out the proper value (assuming you have your tce in sda1)

--- Code: ---blkid /dev/sda1
--- End code ---


--- Quote ---I decided to run

--- Code: ---tce-load -wi getlocale.tcz
--- End code ---

--- End quote ---
You can remove getlocale.tcz from your onboot.lst
It's one time only operation.

linic:
Thanks polikuo! I really appreciate your tips!  :D

I'll test those in the next couple of days and I'll update my original post to correct my mistakes.

You're right, I added tce=sda1 at install time. What I found surprising is the tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" that was automatically added. I guess that's because the installer found the UUID and filled it automatically.

Thanks about the reminder that swap partition and swap file are two different things. I didn't know that the swap partition is faster than a swap file, that's nice!

I want to install my extensions in the larger partition which is the second one. That's why I changed the tce=UUID=. So far, it looks good. I see everytime I tce-load -wi something.tcz, it is written to sda2 which is what I want.

sda1 (1 GB) contains the required files to boot, sda2 (~490 GB) the extensions I add with tce-load and sda3 (3 GB) is the swap partition. I also consider sda2 as "the place where I'll put any other raw data I might want to work with" later (kind of like a home folder in Debian).

polikuo:

--- Quote from: linic on August 15, 2023, 07:39:35 PM ---sda1 (1 GB) contains the required files to boot, sda2 (~490 GB) the extensions I add with tce-load and sda3 (3 GB) is the swap partition. I also consider sda2 as "the place where I'll put any other raw data I might want to work with" later (kind of like a home folder in Debian).

--- End quote ---

That's great, I see you have plenty of room for storage.
Just saying, you can hack around the boot code to make your "/home" directory stays on a hard drive.
It's slower, but it saves RAM.
I sometimes do that for machines with RAM under 1G.
Read the book for more information if you are interested.
You'll need to edit /opt/.filetool.lst

linic:
I can't edit my original post. Since we can quote posts, it makes sense that they are immutable. I have all that I changed from my original post and what I tested in this new post.

Locating extlinux.conf when sda1 is not mounted automatically
I wasn't able to see the extlinux.conf file last time I tried because /mnt/sda1 was empty. I realized that I needed to

--- Code: ---sudo mount /dev/sda1

--- End code ---
I am able to see the files now and to edit them using vi.

Editing extlinux.conf
I was able to try your suggestion to keep only 1 entry in extlinux.conf as I only have Core Linux. It works well!
I removed the swapfile=UUID= from my extlinux.conf since I have a swap partition which is different than a swap file. The swap partition on sda3 mounts automatically as you said. I'm happy that Core could boot even if that boot code was wrong.

My extlinux.conf looked like this at this point:

--- Code: ---DEFAULT core 
LABEL core 
KERNEL /tce/boot/vmlinuz 
INITRD /tce/boot/core.gz 
APPEND vga=788 syslog showapps tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" lang=fr_CA.UTF-8

--- End code ---

Locating onboot.lst when tce= refers to sda2
I looked at /mnt/sda1/onboot.lst and it was there, but empty.
Then, I looked at /mnt/sda2/tce/oboot.lst and getlocale.tcz was there so I removed it.

USB to ethernet adapter behavior
Another thing I found is that there's a way to make eth0 automatically detect the network. I boot from the 600X and turn it off. Then, I put the drive back in the 560Z and it consistently detects the network automatically. I'm not sure why, but as long as I don't open the BIOS on the 560Z, eth0 (which is a 10/100 USB to ethernet adapter) continues to obtain its IP, gateway and name servers automatically. If I open the BIOS of the 560Z and boot, it seems to lose that capability and I need to configure the network manually.

Configuring a persistent home and opt
I found chapter 7.2 "Persistent home/opt" which gives the following warning "every write to these locations will then go directly to the device, so unless the device is a hard drive, you’ll need to weigh on how often it is written" which is alright for my current setup. I was looking to put home on my sda2 and since the section describes also opt, I went on and made that one go to sda2 also.

My 1st try at using what's described in chapter 7.2 was a MISTAKE for the 560Z
Read this section if you want to avoid my mistakes. Skip to My 2nd try which worked and appears later in this post.
I thought that I could make 2 new partitions and add a boot code for home and opt similar to the following:

--- Code: ---home=UUID="3e89f24e-78a3-431e-b1f3-5776363a919b" opt=UUID="b803c5f8-7b87-4bc7-9a21-0a9ccb47f0dc"
--- End code ---
I made sda2 smaller, created an sda4 extended partition and within it created sda5 for home and sda6 for opt.
The end result is:
1. sda1 (primary) for boot at 1 GB
2. sda2 (primary) for tce at ~160 GB
3. sda4 (extended)
3.a. sda5 for home at ~160 GB
3.b. sda6 for opt at ~160 GB
4. sda3 for swap at 3 GB
I list the partitions in this order because that is how gparted displayed them. I did create the extended partition within the space between sda2 and sda3.

My APPEND line in my extlinux.conf looked like this

--- Code: ---APPEND vga=788 syslog showapps tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" home=UUID="3e89f24e-78a3-431e-b1f3-5776363a919b" opt=UUID="b803c5f8-7b87-4bc7-9a21-0a9ccb47f0dc" lang=fr_CA.UTF-8
--- End code ---

When I booted the 560Z, I waited something like 30 to 60 seconds and a message got displayed saying there was no operating system.

My 2nd try worked
I edited my partitions to go back to this:
1. sda1 (primary) for boot at 1 GB
2. sda2 (primary) for tce at ~490 GB
3. sda3 (primary) for swap at 3 GB
and I changed my APPEND line to this:

--- Code: ---APPEND vga=788 syslog showapps tce=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" home=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" opt=UUID="3541ff21-9683-4df0-9ecd-a5a3fce0014c" lang=fr_CA.UTF-8

--- End code ---
Now, home, opt and tce are all on the sda2 partition which has UUID 3541ff21-9683-4df0-9ecd-a5a3fce0014c in my case.

When I booted the 560Z I could confirm by cd /mnt/sda2 that home, opt and tce folders are there now.

Adjusting the .filetool.lst
Then, I checked .filetool.lst which is at /mnt/sda2/opt/.filetool.lst for me. Using

--- Code: ---sudo vi .filetool.lst
--- End code ---
I found these two lines

--- Code: ---opt
home

--- End code ---
At the end of chapter 7.2, "you need to remove the corresponding directory from /opt/.filetool.lst. Otherwise it is both backed up and stored directly, removing any benefits of either". So, I removed opt and home from .filetool.lst.

This is it for now.

Thank you polikuo! You gave me very good tips! I appreciate very much :)

Navigation

[0] Message Index

[#] Next page

Go to full version