Tiny Core Linux

General TC => General TC Talk => Topic started by: hammil on August 14, 2011, 07:35:58 AM

Title: Xvesa: very distorted screen
Post by: hammil on August 14, 2011, 07:35:58 AM
Hi all, I recently managed to install TinyCore on an old Latitude XPi P100SD (which was a challenge, as it doesn't have a CD drive). The terminal works fine, but when I try to start the X server, I get a very distorted image. I can make out the TinyCore logo, the cursor and icons, but the colours are all whacked out and the columns seem to be interlaced somehow. What's more, this effect remains when I kill the X server. I tried experimenting with different display modes, but none of them gave a clear image.

Now, this laptop ran Win95 fine before, so the adaptor and monitor work fine, I'm sure. It is a NeoMagic 2070, and the screen is 640x480, 16bit. I tried using an external monitor, but the effect persisted.

I would try downloading Xorg (as opposed to Xvesa) but the laptop doesn't have modern networking (working on it!) and I cannot download the package files from this website, for inexplicable reasons. It says I have to use the Application Browser. Well what if the Application Browser doesn't work, hmm?

Can anyone help?

Hamish Milne
Title: Re: Xvesa: very distorted screen
Post by: roberts on August 14, 2011, 08:05:06 AM
Older laptops many times need framebuffer. See: http://distro.ibiblio.org/tinycorelinux/faq.html#framebuffer
Title: Re: Xvesa: very distorted screen
Post by: hammil on August 14, 2011, 08:59:03 AM
Thanks, that's great, but I still can't get the Xfbdev extension, as I don't have internet on that machine. Is there any way of obtaining Xfbdev.tcz separately and installing it offline?
Title: Re: Xvesa: very distorted screen
Post by: Rich on August 14, 2011, 09:37:59 AM
Hi hammil
You could boot another machine using a Tinycore CD and install any applications you need to a
USB memory stick. Then plug the stick into the Latitude after it has booted and copy the files from
the stick's  /tce/optional  to the Latitudes  /tce/optional  directory.
Title: Re: Xvesa: very distorted screen
Post by: hammil on August 14, 2011, 10:22:12 AM
Thanks for your suggestion. Thankfully, that wasn't my solution in the end, as it would have been quite time consuming for me to do, and the Dell lacks a USB port. In the end, I found you can manually get the extension files: http://distro.ibiblio.org/tinycorelinux/3.x/tcz/extension.tcz . In my humble opinion, links to these should be added to the repository, to simplify the process of offline installations.

So I just copied that over (by connecting the hard drive to my computer) and used tce-load -i

Now to set up the X server...
Title: Re: Xvesa: very distorted screen
Post by: gerald_clark on August 14, 2011, 09:35:24 PM
Manually downloading extensions does not satisfy dependencies, and is therefore discouraged.
That is the reason for the AppBrowser requirement.
Title: Re: Xvesa: very distorted screen
Post by: cast-fish on August 15, 2011, 05:07:38 AM

after reading the instructions for the frame buffer, is it possible to do a similar process but without using bootcodes? (my laptop won't allow keyboard entry as the
keyboard is broke)

Could i simply boot to the tcl desktop and run a terminal and follow the frame buffer instructions that are in this thread?

currently "htop" tells me this about my screen

Xvesa -br -screen 1024*768*32-shadow-mouse

Does that mean it is in 32 bit color mode?...(also)....thanks

Title: Re: Xvesa: very distorted screen
Post by: curaga on August 15, 2011, 06:48:23 AM
No, the framebuffer must be set before boot.
Title: Re: Xvesa: very distorted screen
Post by: cast-fish on August 15, 2011, 07:00:52 AM

oh right.


will have to see about it later with a hdd tcl instal

Title: Re: Xvesa: very distorted screen
Post by: maro on August 15, 2011, 02:39:18 PM
... will have to see about it later with a hdd tcl instal ...

Well, if you boot from CD-ROM you could customize an ISO image that contains permanently your specific boot codes.

This wiki section (http://wiki.tinycorelinux.net/wiki:remastering#creating_an_iso) contains the command to build an image. Obviously it is to be run after you've extracted all files from the original image and amended '/boot/isolinux/isolinux.cfg', but without the need to change anything in the initrd (e.g. 'tinycore.gz).
Title: Re: Xvesa: very distorted screen
Post by: hammil on August 15, 2011, 04:51:04 PM
Well, managed to get the damned thing working! Runs pretty smoothly with 100MHz, so I can't complain!

If anyone's interested (e.g. cast-fish!), here's how I managed it with no CD or USB, a P1 processor and 40MB RAM:
(Sequence shortened significantly! Lots of experimentation)
Now, I did have and use a floppy drive (partly for convenience, partly necessity) but I want to provide a complete guide for those who have no USB, CD, floppy or even working keyboard.

First things first, connect your hard drive. You can use a £5 USB-IDE cable, or connect it directly, using a laptop-desktop IDE adaptor if necessary.
Type 'dmesg' just after you connect to find the device name. It should appear frequently as 'sdX' in the output.
First, let's partition and format the drive.
Code: [Select]
sudo fdisk /dev/sdX
Now, you'll need to set some swap space, so I got my target's RAM size, doubled it, then divided it by the cylinder size shown, in megabytes. For me: 40*2 /1, so 80 cylinders of swap space.
Code: [Select]
[default minus swap space, as discussed]
p [just to check!]
Right, that's the partition done, now to format. I used ext2, but you could probably use ext3 with no problems.
Code: [Select]
sudo mkfs.ext2 [or ext3] -I 128 [to avoid compatibility problems] /dev/sdX1Now you'll need to download Grub4DOS here: https://code.google.com/p/grub4dos-chenall/downloads/list (https://code.google.com/p/grub4dos-chenall/downloads/list)
Extract it and cd to the directory, then:
Code: [Select]
sudo ./bootlace.com --time-out=0 /dev/sdX
sudo mkdir /mnt/sdX1
sudo chmod 0777 /mnt/sdX1
sudo mount /dev/sdX1 /mnt/sdX1
cp ./grldr /mnt/sdX1
Now to make the menu.lst file:
Code: [Select]
vi /mnt/sdX1/menu.lst
root (hd0,0)
kernel /bzImage root=/dev/hda1 vga= [ look here: http://wiki.tinycorelinux.net/wiki:display_modes ]
chainloader (hd0,0)
Now download tinycore.iso from the homepage. We'll need to extract some files, easiest way is to use the archive manager:
Code: [Select]
sudo file-rollerNow open up tinycore.iso, open 'boot' and extract bzImage to /mnt/sdX1. Then extract tinycore.gz. Open that archive and extract tinycore.cpio. Open that archive and extract all the files to /mnt/sdX1.
Now close the archive manager and download Xfbdev: http://distro.ibiblio.org/tinycorelinux/3.x/tcz/Xfbdev.tcz (http://distro.ibiblio.org/tinycorelinux/3.x/tcz/Xfbdev.tcz)
Copy it to /mnt/sdX1/opt/tce. Create the directory if it doesn't exist.
Code: [Select]
sudo umount /mnt/sdX1You should now be able to disconnect the hard drive and put it back into the target machine.
Upon booting, if everything worked, TC should try to start Xvesa. One of these should happen:
If you get a black screen with a cursor, but no prompt, press CTRL+C, then type 'sudo reboot' to try it again
If you get a good desktop, then you can stop here! Xvesa works for you.
If you get a grub prompt, check menu.lst and bzImage. Enter the commands in menu.lst one by one to check for problems. On newer machines, you might need to use /dev/sda1 rather than /dev/hda1.
If you can't get it to boot from hard disk (and it's not a BIOS issue) check for grldr and run ./bootlace.com once more.
If you get a white or garbled screen after initial loading, press ALT+BACKSPACE, and carefully type 'touch /tmp/text' then 'sudo reboot'

Assuming the last option occurred, upon rebooting you should be in the TC shell. You might need to press CTRL+C
Attempting to start Xvesa automatically set up our .xsession file.
Right, from the TC prompt:
Code: [Select]
sudo rm -f /tmp/text
tce-load -c -i /opt/tce/Xfbdev.tcz
Now, let's check everything went OK...
Code: [Select]
Xfbdev --help
cat .xsession
The first command should spew out a lot of usage documentation. If it doesn't e.g. 'not found', you'll need to reload the TCZ file.
With the second command you should see about 10 lines of code. One of them should be a long line with 'Xvesa' in it. If it doesn't, do a 'sudo reboot' and try starting Xvesa once more.
Now do 'sudo vi .xsession' to open the editor. Press 'i', navigate to the long line, and replace with:
Code: [Select]
Xfbdev -mouse /dev/input/mice,5 -nolisten tcp -I &>/dev/null(/dev/input/mice,5 should be replaced by whatever was originally in the command line for Xvesa in .xsession)
Yep, straight from the wiki page!
Now press ESC, then type ':wq', then 'sudo reboot'
If everything worked, you should now have a working desktop
If the screen is garbled, it probably tried to start Xvesa again. Check the .xsession file.
If you only have a blank screen with a cursor for some time, press CTRL-C and type 'Xfbdev --help'. If it says 'not found', reload the TCZ file, ensuring to use the -c and -i options.
A cursor but no desktop means there is a problem with the window manager.
If it always goes to the prompt, remove /tmp/text.

Right, that's everything, I believe. Any questions?