This site is now 100% read-only, and retired.

Question: Install Debian using a serial console

Posted by dopehouse on Fri 19 Aug 2005 at 13:55

Tags: none.

I've got an old pentium 120 with no graphics card and I want to install Debian via serial console.

I typed 'linux console=ttyS0,9600n8' blindly on the bootprompt. But the only result was, that the kernel loaded and stopped.

I searched the web for a howto but found nothing that helps.

 

 


Re: Question: Install Debian using a serial console
Posted by Anonymous (194.186.xx.xx) on Fri 19 Aug 2005 at 13:42
Is it possible to boot PC without VGA card? Are you sure?
I do not think so.

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by ajt (204.193.xx.xx) on Fri 19 Aug 2005 at 14:09
[ View Weblogs ]
You can get a PC Weasel board that emulates a VGA card, and provides serial, but in general x86/BIOS based PCs won't boot without a graphics card.

http://www.realweasel.com/

--
"It's Not Magic, It's Work"
Adam

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dopehouse (84.130.xx.xx) on Fri 19 Aug 2005 at 15:42
They do boot without vga card. You must disable halt on errors in the BIOS and the kernel should redirect the output to the first serialport automaticliy. But I think there is a problem with the kernel on the debian floppy images.

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by Steve (82.41.xx.xx) on Fri 19 Aug 2005 at 15:48
[ View Weblogs ]

Reading the Remote Serial Console HOWTO might be useful..

If you can make the machine boot without the screen then that's a good start.

After that how are you trying to connect? Presumably you have a serial cable and minicom connected to it upon another host?

Steve
-- Steve.org.uk

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dopehouse (84.130.xx.xx) on Fri 19 Aug 2005 at 16:29
I allready read the remote serial console howto. the problem is that the Debian floppys won't start the console. I've allready setup my server to print out the kernelmessages to the serial console and grub is ready to show the output to the serial console. But the floppy installer version isn't able to show some output. I also tried it on my workstation with the kernel-parameters 'console=ttyS0,9600n8', then the kernel loads but when the root disk should be insertet the kernel hangs and there is no output to the monitor or the serial terminal.

Sorry, but there were no usefull replys for my problem. :)

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by Steve (82.41.xx.xx) on Fri 19 Aug 2005 at 16:38
[ View Weblogs ]

The only time I ever used a serial install was on a Sun Netra, and I used the network booting "business card" ISO image.

If you have access to CD-ROM but not the bandwidth for a full ISO download you might be able to try that.

Steve
-- Steve.org.uk

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by luka (83.131.xx.xx) on Fri 19 Aug 2005 at 16:53
Isn't it easier to put old PCI card into the box and after installation and settings, remove it out?

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dopehouse (84.130.xx.xx) on Fri 19 Aug 2005 at 17:01
Yes, it is. But I want to try it via serial terminal. And this is the Debian Administration site and I hope someone have an idea to sove this problem.
I would make it because it is possible to make it!

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by Anonymous (209.210.xx.xx) on Fri 19 Aug 2005 at 18:02
I'm not sure why you had problems finding this... I've used this many a time to install on Compaq DL360's via a terminal server.


http://www.patoche.org/LTT/install/00000103.html

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by wolftales (24.20.xx.xx) on Sun 21 Aug 2005 at 16:35
You can do this. I suspect if you had put console=/dev/ttyS0 instead of just console=ttyS0 you might have gotten it to work for you.

Sometimes buying hardware for old systems just isn't cost effective or desireable even if it is easier. So, like you, I have used serial to install on these type systems just like you.

Good Luck!

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dkg (216.254.xx.xx) on Fri 26 Aug 2005 at 00:36
[ View Weblogs ]
I've done a lot of serial console work. It really is the way to go. video consoles are for workstations, not servers!

I think the thing that will help you the most with this project is to actually get your bootloader to use the serial line itself. the remote serial console HOWTO has a bunch of information about how to make the bootloader itself talk to the serial console.

You say you're using boot floppies, so i'm assuming that yer dealing with syslinux as your boot loader. You'll want to add a line to syslinux.cfg on that floppy. If you can get the bootloader to talk to the serial console, you'll be much further along. There are basically 3 fundamental steps to getting a server to work over a serial console:
  1. get your bootloader to talk to the serial console.
  2. get the linux kernel to use the serial line as a console instead of VGA (this is usually something like a console=ttyS0,115200n8 parameter passed to the kernel from the bootloader)
  3. tell init to launch a login session (getty) on the serial console by modifying /etc/inittab
You need to make sure you've got that first step working smoothly first.

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dopehouse (84.130.xx.xx) on Fri 26 Aug 2005 at 01:54
I already read the RSC HOWTO. And I all got one server working with grub on serial and terminal and getty just works fine. What I want to do is to install Debian on an old Pentium 120MHz. There was a VGA-Card(100% ok) in the system till I get it out. The reason why I did so was, that i couldn't get the serial consol working with the Debian Sarge installer floppy. I read that a system without an VGA-Card should redirect the in- and output to the serial console. Till now I can't get this to work.

I already compiled a new kernel for the boot floppy, with serial consol support, but it rans into PANIC ;( . My fault, wrong kernel version.

I'll try it again this weekend. And I think about to build my own boot floppy's with a newly compiled Debain installer and kernel (Need alot of Coffee this weekend).

If anyone got it work with the floppy images from the Debain server and read this before the weekend, PLEASE let me know :).

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dkg (216.254.xx.xx) on Fri 26 Aug 2005 at 05:11
[ View Weblogs ]
are you dealing with the floppies from here?

My impression is that the stock debian kernels in sarge (including the ones from the floppies) all have support for serial consoles already. Maybe i should test that first, though...

ok, i did a bit of testing, thanks to qemu!

i downloaded the floppies from here, and modified the contents of boot.img. The only file i changed was /syslinux.cfg, and i made its contents look like this:

serial 0 9600
display syslinux.txt
default linux

F1 f1.txt
F2 f2.txt
F3 f3.txt
F4 f4.txt
F5 f5.txt
F6 f6.txt
F7 f7.txt
F8 f8.txt
F9 f9.txt
F0 f10.txt

label linux
        kernel linux
        append vga=normal initrd=initrd.gz ramdisk_size=1838 root=/dev/rd/0 dev\
fs=mount,dall rw console=ttyS0,9600n8 --
label expert
        kernel linux
        append DEBCONF_PRIORITY=low vga=normal initrd=initrd.gz ramdisk_size=18\
38 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n8 --

prompt 1
timeout 0
I know, 9600 bps isn't terribly speedy, but i don't know qemu or syslinux well enough to know if they'll support different speeds, and 9600 is basically guaranteed to work.

After making the change to the file within the bootdisk image, i saved out the newly tweaked diskimage as sboot.img. Then i fired up qemu with the following command:

qemu -fda sboot.img -nographic -serial stdio
This emulates a machine with no graphics card, uses stdin and stdout to emulate the first serial line, and puts sboot.img as the first floppy drive (note that it's my modified sboot.img, not the original boot.img). Everything worked for me. When it prompted me for the root disk, i just did the following (from outside of qemu, of course):
cp sboot.img sboot-sav.img
dd if=root.img of=sboot.img
This saves a copy of sboot.img (should i want it later), and "swaps disks" for qemu. You won't need to do anything that goofy for working with actual floppy disks.

In another experiment, I also tried inserting DEBIAN_FRONTEND=text. i prefer the text frontend over the default newt for serial installs because it is much quicker (fewer bps needed). You can read up a bit about the frontends in the debian-installer manual. But, alas, it looks like the stock floppy disk images don't have that alternate frontend. maybe it was removed for size concerns? i'd certainly be interested in learning how to make a customized serial-console floppy set.

Good luck with this project! And post back here with the results of your labors!

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dopehouse (84.130.xx.xx) on Sat 3 Sep 2005 at 13:52
I'm very sorry. The problem wasn't the bootparameters. It was my floppydrive. I got it work now. Thanks for all your help. *How embarrassing* :(

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by Anonymous (125.161.xx.xx) on Thu 12 Mar 2009 at 09:06
how to do it, can you explain this step, because i want to do it :)

[ Parent ]

Re: Question: Install Debian using a serial console
Posted by dopehouse (92.228.xx.xx) on Thu 12 Mar 2009 at 09:33
The last time I did an installation over the serial console, I just downloaded the floppy images from debian.org and inserted them into the floppy drive, without any adjustments to the config files. I just removed the graphic card and connected a null-modem cabel to the server and my notebook. On some machines it is necessary to adjust some bios settings before you take out the graphic card. And some mainboards won't start without a graphic card at all.

Without any adjustments to the syslinux config, the baud-rate is 9600kpbs (if I remember it right).
---------------------
Article published under GNU Free Documentation License

[ Parent ]