Frugal on CF for a Soekris NET4801


Forum: HD Install
Topic: Frugal on CF for a Soekris NET4801
started by: och

Posted by och on June 06 2007,14:24
I perfromed a frugal install from a 3.3 live CD booted on a regular laptop, on a CF known at that time as hde.
Then I edited /boot/grub/device.map so as to keep hd0 only as hde (the HDD of the orginal laptop would have been in the map otherwise).
The CF was then installed in a Soekris Net4801. This is a very light pc the console interface of which is a serial port (19200 8-N-1) I connected to my tower pc under W98. I run an hyper-terminal to see what is going on when my Sooekris is powered up.
Grub works:
Code Sample
Booting 'DSL'

root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/linux24 root=/dev/hde1 quiet 2 noacpi noapm nodma noscsi frugal ss
h noeject norestore
  [Linux-bzImage, setup=0x1400, size=0xf17f7]
initrd /boot/minirt24.gz
  [Linux-initrd @ 0x7f29000, 0xc64e1 bytes]

But then nothing happens for a while and I eventually get
Code Sample
0`3

and cannot do anything from there.
I was wondering if any cheatcode was available so that the system knows it has to maintain tty on com port (if this is the problem).
The nice boot of DSL with colors and a looping slash may also be confusing for this very simple hardware.
Does anybody have an idea about the way to go further with DSL?

Posted by curaga on June 06 2007,14:53
Read < this >, it's the linux serial console howto..

By default it doesn't have a tty on serial port..

Posted by och on June 07 2007,14:24
Thank for this very interesting link.
By default the pc card works at 19200 but I also tried 9600 (I had to change the baud rate during the boot, when the BIOS gives the hand to Grub I guess). It stops at the same place with both baud rates:
Code Sample
Press any key to continue.
kernel /boot/linux24 root=/dev/hde1 quiet 2 noacpi noapm nodma noscsi frugal ss
h noeject norestore console=ttyS0,9600n8
  [Linux-bzImage, setup=0x1400, size=0xf17f7]
initrd /boot/minirt24.gz
  [Linux-initrd @ 0x7f29000, 0xc64e1 bytes]

Which makes me think I should modify something in minirt24 (something in initrc?).
The strange thing is that, when my hyperTerminal is configured at 9600, the funny message I get after a while with nothing (probably the duration of the boot with the console not being redirected to the serial port) is now
AT
Does DSL think the serial port is connected to a modem?

Posted by ^thehatsrule^ on June 07 2007,15:10
Maybe you could modify /etc/inittab to spawn gettys on your serial connection.  Though I guess this could mean nothing would show up until the system was booted...
Posted by och on June 08 2007,11:34
It seems inittab  is created  during the boot process for there is none in /etc (the one in  minirt24).
I don't mind getting something after the boot completed only, as long as it boots (I should be able to know what happened with dmesg).
How do I modify a non existing inittab?

Posted by ^thehatsrule^ on June 08 2007,13:30
I think you might have to look in /KNOPPIX - I don't think it's created on the fly.

btw, just a thought about your AT and 0`3 messages: perhaps its due to the booting where it tries to probe your devices... (so it goes through modems, etc.)

Posted by och on June 13 2007,12:10
I tried (probably not hard ehough) to find out how to modify something in /KNOPPIX/KNOPPIX but did not get through.
I tried
Code Sample
sudo extract_compressed_fs /knoppix/knoppix > cimage.iso

because I had found that in a book but it refuses doing the job.
Would it be easier to do the job in bootlocal.sh or it is not the right way?

Posted by ^thehatsrule^ on June 13 2007,16:15
see remastering the dsl/knoppix image

You could try placing commands in bootlocal.sh though if you wish.

Posted by och on April 21 2008,14:07
I have now re-created a KNOPPIX image after modifying /etc/inittab with:
Code Sample

init:3:initdefault
...
~~:S:respawn:/bin/bash -login >/dev/ttyS0 2>&1 </dev/ttyS0
...
1:12345:respawn:/bin/bash -login >/dev/ttyS0 2>&1 </dev/ttyS0

I had suppressed all further references to tty1...4

I am still stuck at initrd launching /boot/minirt24.gz : it issues a bunch of empty lines and then nothing.
I'd like to get back at least an error message I could chew on...

Posted by och on April 24 2008,13:52
I replaced respawn:/bin/bash -login...
by
Code Sample
respawn:/sbin/getty -L -n -l /bin/bash ttyS0 19200 vt102

without better result.
Reading that sometimes a /dev/modem was pointing at /dev/ttyS0 I checked if any link was on ttyS0 and I found /dev/pilot. What's that?
After a lot of modifications in /etc/inittab, I noticed inittab.multi. I modified it in the same way but I am not sure of its purpose.
I found in a post a cheatcode '3'. Is it a mistyping or any runlevel can be directly provided as a cheatcode, even if only '2' is given by the documentation?

Posted by curaga on April 24 2008,13:55
Any runlevel can be run as a cheatcode, 1 is also a synonym with "single"
Posted by och on April 25 2008,08:27
I tried to boot DSL from CD on a regular laptop with
Code Sample
dsl acpi=off 3 console=ttyS0,19200n8

Another laptop with an hyperTerminal was connected on the other side of the serial link.
It did not see anything coming out of the serial link but the same funny characters I usually got from my embedded pc. I now can say it is issued by the "autoconfiguring devices" step.
So why does the kernel not take into account the "console" instruction?
Once booted, I tried a
Code Sample
getty -L -n -l /bin/bash 19200 ttyS0 vt102

and got a root shell in my Hyperterminal.
The very same command after respawn in /etc/inittab from KNOPPIX does not do anything visible.
Perhaps is there a problem during the boot process but as long as the boot messages are not redirected to the serial interface I won't be able to know what happens.

Posted by curaga on April 25 2008,13:13
The inittab in KNOPPIX is not used, you might want to change inittab in minirt24.gz..
Posted by och on April 25 2008,14:40
I eventually got a shell on my serial port thanks to bootlocal.sh inspite of getting nothing during the whole boot. I'll try curaga's proposal on Monday. By now I will describe my way to go around in case it can help someone.
First of all I would say the kernel was compiled without the possibility of getting the console on the serial port for I read that it was not a default option.

I booted DSL CD on a regular laptop in which I had inserted my CF (with a PCMCIA adaptor). My CF was /dev/hde whereas the HDD of the laptop was /dev/hda (tricky...)
After making a boot partition of 60Mb in /dev/hde1, another of 68Mb in /dev/hde2 (followed by a mke2fs), I made a grub Frugal install on hde1 with "3 ssh noeject acpi=off home=hde2 restore=hde2 opt=hde2"
After that I mounted /dev/hde1 and I suppressed /mnt/hde1/boot/grub/device.map
I mounted /dev/hde2, created /mnt/hde2/opt and copied /opt/bootlocal.sh into it.
I added
Code Sample
/sbin/getty -L -l /bin/bash -n 19200 ttyS0 vt102

in bootlocal.sh
Then I rebooted my regular laptop on its regular OS (which is Knoppix 5.1). In that configuration the laptop HDD was /dev/sda and my CF was /dev/hda
I guess this is the lucky part of the story for I am not sure of the way to fool grub with the devices
Code Sample
mount /dev/hda1 /mnt/hda1
cd /mnt/hda1
grub-install --root-directory=. /dev/hda

I suppressed sda from boot/grub/device.map,
rerun grub-install,
replaced hde by hda in boot/grub/menu.list
After inserting the CF in my embedded pc, in spite of a blind boot, bash prompt appeared on the hyperTerminal. I could then give a password to dsl and get network access to the pc through ssh

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.