Adam Purkrt's webpage

X Windows

I start X Windows with startx. Here is my .xinitrc and two programs I use: x.c and xh.c

2021-02-21 20:37 moments ago, I've successfully transferred Slackware 3.0 running on an i486SX/25MHz-8MB from one PATA IDE disk to another, without using a floppy disk, with a one-line change in lilo 0.16 source code, recompiling lilo and using a specially crafted config file for lilo. The change is in geometry.c file, geo_comp_addr function, line 427, which originally copies the device number to addr structure from geo structure. When transferring the system from already booted device, the target disk is second, hence the device written by vanilla lilo to the boot sector and to the map file is the second ATA disk, 0x81, which after eventually reattaching the disk as first does not work. The solution is to simply assign 0x80, a number corresponding to first ATA disk, to device member of addr structure on the above mentioned line. I have mounted /dev/hdb1 to /mnt. The /mnt/etc/lilo.over file was as follows:

boot = /dev/hdb
vga = normal
ramdisk = 0
map = /mnt/boot/map
install = /mnt/boot/boot.b
image = /mnt/vmlinuz
  label = Linux
  root = /dev/hda1

The final command to run, after patching and recompiling lilo in /mnt/root/liloover/ (over for "override") was "/mnt/root/liloover/lilo -C /mnt/etc/lilo.over" I have first verified the expected result with "/root/liloover/lilo -t -v -v -v -v -C /mnt/etc/lilo.over".

2021-02-25 update: lilo uses linux system calls to write to disk; the device number in the geo structure refers to bios calls used during bootup; I was in need to prepare a disk to boot on another motherboard, which necessitated linear adressing, so I have added "linear" on a separate line in /mnt/etc/lilo.over. The change in source code I now use is in geometry.c on line 229, where I simply assign 0x80 to the device number in geo structure, which is later used either on line 419 or 427, covering both linear and CHS addressing cases. In my case, the value is bitwise ORed with LINEAR_FLAG, which is 0x40, so the final device number used for bios calls, as seen in the verbose output is 0xc0.