LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2010, 08:38 AM   #1
yesyes
LQ Newbie
 
Registered: Apr 2010
Location: Berkshire, UK
Posts: 6

Rep: Reputation: 0
How to install Linux on embedded box without VGA?


Hi. I'm posting this in the Newbie section because I would need some newbie-level answers... ;-)
I'm not totally new to Linux. I've used Linux but haven't done anything like what I'm going to ask about.

I happen to have a small embedded box that has a Via C3 600MHz CPU (the one that doesn't support the cmov command, I've read..), 3 NICs, 512MB RAM, 1 serial port, 1 CF slot and one IDE port. There is no VGA or Keyboard/mouse ports.

What I want to do with this box is to install some Linux on it and Cacti and keep this running as a network / traffic monitor. Normal access should be through a web interface on the box.

I have a 20GB mini-HDD that I want to use for the install. I also have the option to use a CF card but that's probably not such a good idea because of the limited write cycles of flash memory.

I've had some router / firewall distros running on the box off a CF card just to test it (ipfire, zeroshell, m0n0wall) and these were running just fine. So I know the box should be OK for some small Linux.

The actual question I have is:
How would I go about installing Linux without having VGA on the box. I would need to install it in a way that the serial port on the box acts as a console. And not install any X server components, of course.

Would it be better to install it directly on the box? Or connect the hard drive to a desktop machine and install there (with VGA) and then move the HDD to the box? (my desktop machine is running Windows 7, not Linux).

Also, which distribution would you recommend for that? I'd prefer one where I would be able to install cacti easily with a package manager.
 
Old 04-03-2010, 09:03 AM   #2
Prehistorik
LQ Newbie
 
Registered: Oct 2006
Location: St. Petersburg, Russia
Distribution: Ubuntu
Posts: 26

Rep: Reputation: 1
Well, after some googling around I can suggest you nothing but:

* install a clean Linux onto your 20GB hard drive (I think you'd better use GRUB as a boot loader), configure it not to start X (default runlevel 3)
* alter GRUB's menu.lst as shown in http://www.iitk.ac.in/LDP/HOWTO/Remo...ader-grub.html and http://www.iitk.ac.in/LDP/HOWTO/Remo...rnel-grub.html (modify kernel, root device and initrd paths to suit your installation)
* plug the hard drive into the box and connect to it using the serial port

If anything goes well, you'll get a GRUB welcome menu on your serial console right after the first boot.

Installing Linux right on the box will require creating a special installation boot disk with the ability to operate on a serial port, so I think it may be more difficult than the method above.

Anyway, there's a good HOWTO on this: http://www.iitk.ac.in/LDP/HOWTO/Remo...WTO/index.html.

UPDATE

Quote:
Originally Posted by yesyes View Post
Also, which distribution would you recommend for that? I'd prefer one where I would be able to install cacti easily with a package manager.
Good Ol' Debian? Cacti developers suggest installing it using apt-get install cacti in Debian, so it has to be in the repository

Last edited by Prehistorik; 04-03-2010 at 09:17 AM.
 
1 members found this post helpful.
Old 04-03-2010, 09:42 AM   #3
yesyes
LQ Newbie
 
Registered: Apr 2010
Location: Berkshire, UK
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the quick reply.

So, basically, I would just take any Linux distro (e.g. Gentoo), put the 20GB HDD in my desktop machine (disconnecting all other HDDs) and install that distro onto the 20GB HDD without X server.

Then I'd change the GRUB config to use the serial port as console (for both GRUB itself and the Linux Kernel) and then move the HDD into the embedded box and boot from it.

With a bit of luck I'll have a text-only Linux running on that box via the serial port. I would then install Cacti from the console.

That's all? That would be a lot easier than what I expected... ;-))
 
Old 04-03-2010, 09:45 AM   #4
yesyes
LQ Newbie
 
Registered: Apr 2010
Location: Berkshire, UK
Posts: 6

Original Poster
Rep: Reputation: 0
Just saw your edit recommending Debian. I was considering both Debian and Gentoo. I've been using Ubuntu before and that's a Debian fork as far as I know. So I might go for Debian.

But it will have to be a distro that has i586 support as the Via C3 CPU doesn't have the cmov command and therefore can't run a i686 kernel. I'll check that out which distro has a i586 kernel still.
 
Old 04-03-2010, 03:14 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
If the machine will boot via PXE and can load a kernel/initrd via TFTP, then you can hook a serial console up to the system and boot the install kernel and initrd using PXE and continue on with an installation as normal. To use a serial console you'll need to hook a PC up to the serial port and use something like HyperTerm (Windows) or MiniCom (Linux, *nix). You'll need to checkthe specs of the embedded box to fix out the bit rate, parity, and other parameters needed to establish the serial connection.
 
Old 04-03-2010, 03:37 PM   #6
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,330

Rep: Reputation: 227Reputation: 227Reputation: 227
Use a serial console.
 
Old 04-03-2010, 04:10 PM   #7
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 815

Rep: Reputation: 254Reputation: 254Reputation: 254
You may find virtual machine software such as VirtualBox helpful in order to install and configure the Linux OS. You can create virtual disk images and you can use "dd" or some other method to copy those as raw sectors to a hard disk or other device. You can define virtual serial ports and other virtual devices that may help you test the OS configuration before you attempt to boot on the real hardware.
 
Old 04-04-2010, 04:25 AM   #8
Prehistorik
LQ Newbie
 
Registered: Oct 2006
Location: St. Petersburg, Russia
Distribution: Ubuntu
Posts: 26

Rep: Reputation: 1
Quote:
Originally Posted by yesyes View Post
But it will have to be a distro that has i586 support as the Via C3 CPU doesn't have the cmov command and therefore can't run a i686 kernel. I'll check that out which distro has a i586 kernel still.
Then Gentoo may be appropriate. (It builds from sources, so it can fit any CPU!) But AFAIK you'll have to specify the desired CPU architecture manually and rebuild anything for i586 including the kernel.

Unfortunately, I have no experience installing Gentoo, so it's just an assumption.
 
Old 04-04-2010, 04:33 AM   #9
Prehistorik
LQ Newbie
 
Registered: Oct 2006
Location: St. Petersburg, Russia
Distribution: Ubuntu
Posts: 26

Rep: Reputation: 1
Quote:
Originally Posted by Erik_FL View Post
You may find virtual machine software such as VirtualBox helpful in order to install and configure the Linux OS. You can create virtual disk images and you can use "dd" or some other method to copy those as raw sectors to a hard disk or other device. You can define virtual serial ports and other virtual devices that may help you test the OS configuration before you attempt to boot on the real hardware.
... This method can also be used for installing Linux directly on a real hard drive. But then VMWare Player (or Workstation, or even Server ) has to be used instead VirtualBox as it supports using real devices as virtual ones. For Player, virtual machine configurations can be created (for example) using http://www.easyvmx.com/.
 
Old 04-04-2010, 07:28 AM   #10
yesyes
LQ Newbie
 
Registered: Apr 2010
Location: Berkshire, UK
Posts: 6

Original Poster
Rep: Reputation: 0
Great, thanks for all the suggestions, guys... ;-))

I think I'll try the first suggestion first; installing on my desktop and then change the grub config to use the serial port for the console.

I'm just waiting for an adapter before I can start (the HDD is a 1.8" one with a ZIF connector to keep everything small and low power. just waiting for the ZIF to IDE adapter).

I'll keep posting about progress and more questions... ;-))

Thanks again, you've been a great help already...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacom's pfSense (embedded w/vga support) boots in vmware but not realware? lumix *BSD 0 11-13-2008 06:59 PM
How to install Perl in embedded Linux???? neilengineer Linux - Software 0 03-12-2007 10:23 PM
how to build set top box using embedded linux? SweetDreams Linux - Desktop 1 02-13-2007 03:45 AM
Embedded Linux Based Set-top-box JoeyJoeJo Linux - Hardware 7 08-21-2003 04:19 PM


All times are GMT -5. The time now is 04:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration