LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 12-04-2015, 03:59 PM   #1
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Rep: Reputation: Disabled
Embedded Linux not booting


Hello, everybody.

In the company where I work we have a book scanner that has an embedded Linux that doesn't want to boot. We managed to take the disk out of the scanner and connect it to another computer, so we can boot this computer from a live CD to try to recover the scanner's system.

The disk appears not to have any boot information, so I went looking for more information and it looks like it was supposed to have LILO (one of the rescue CDs I used located a file that I think could be used by LILO).

After some searches I saw that, apparently, the way of recovering LILO is to chroot into the old system, but I couldn't do it, as it complained of missing directories, the scanner's disk has only a boot directory.

At the moment I don't have any ideas of what to do, and, being late Friday here in Portugal, I don't have access to the computer until Monday, so I am not able to give more information for now, but if anyone can shed some light on what I may try it would be great.

Thanks in advance.
 
Old 12-04-2015, 04:27 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
Without knowing anything about the hardware there isn't much light to shed. I would assume the system boots from onboard flash or a memory card. If so, I assume the hard drive is for image storage and maybe some configuration files. What else did you find on the disk?
 
Old 12-04-2015, 04:38 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,257
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
Does it have a console screen or is it operated by some other method like touchpad?

Do you get any helpful messages when it fails to boot?

Can you list the files in the boot directory here, that might allow us to identify the kernel and maybe OS version, if we are lucky. I wouldn't try a chrooted lilo recovery yet - you don't know if it is a lilo problem or not. In any event, the root filesystem will need to be mounted when you run lilo and if it is on a different device you might bork something.

As already noted, without knowing anything about the hardware there isn't much that can be said about it. So gather as much info as you can and try to not do anything potentially destructive.
 
Old 12-04-2015, 04:45 PM   #4
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,669

Rep: Reputation: 485Reputation: 485Reputation: 485Reputation: 485Reputation: 485
Quote:
In the company where I work we have a book scanner that has an embedded Linux that doesn't want to boot
As per Mchaelk, can you give us the make and model of the book scanner? Maybe there's info out there on how it works.

If the OS is embedded I'd expect it to be held as firmware rather than on the internal disk though there may be some configuration and setup files held there. I feel the disk would be mainly used as storage for the books scanned.

Give us a few more hardware detail to work on.

Play Bonny!

 
Old 12-04-2015, 05:43 PM   #5
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks, everybody.

Sorry for not providing more information, maybe I shouldn't have started this thread when I don't have access to all the information, but I thought the sooner I started it the better.

Anyway, the scanner is a Copibook RGB, the disk is a 128MB flash disk on a small board that connects directly to the IDE socket of the computer inside the scanner (the computer is a small tower computer with an Intel motherboard, the only thing missing is the computer's "shell", the full chassis is inside the scanner). When booting the computer shows an "error 110" (I think it's the BIOS that gives that error) and then complains that there's no system disk. If I enter the BIOS setup I can see the disk in the drives section, but it doesn't show as an option on the boot list.

Edit: I forgot to say that the disk has two partitions, one formatted with FAT32 with just some 8 files and the other with the Linux system. The only thing I remember of the contents of the boot directory is that it has file named fs.img.gz.

Last edited by ArMaP; 12-04-2015 at 05:50 PM.
 
Old 12-04-2015, 05:54 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
So it is a regular x86 compatible PC and the flash disk is probably the boot device. Do you remember any of the files that were on the disk?
 
Old 12-04-2015, 06:19 PM   #7
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Sorry, I don't remember any files at the moment, and I can only see them on Monday.

Sorry.
 
Old 12-05-2015, 12:28 PM   #8
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,669

Rep: Reputation: 485Reputation: 485Reputation: 485Reputation: 485Reputation: 485
It looks like the software running on the Copibook RGB is proprietary, there's a possibility you may have to go to i2S to get help. There appears to be some sort of activation code once you get to the software, see here.
I take it you don't have a maintenance contract.

Meanwhile... We'll wait till you come back with the file details.

Play Bonny!

 
Old 12-05-2015, 03:21 PM   #9
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Soadyheid View Post
It looks like the software running on the Copibook RGB is proprietary, there's a possibility you may have to go to i2S to get help.
That will be the last thing to try, I hope we don't have to.
 
Old 12-07-2015, 07:04 AM   #10
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Back at work, these are the files on the boot directory:

boot-bmp.b
bootsplash.bmp
fs.img.gz
linux
map
System.map
 
Old 12-09-2015, 06:01 AM   #11
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Unhappy

Anyone?
 
Old 12-09-2015, 07:19 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
If you believe the hardware is ok then no system disk would indicate the boot loader could be corrupted. It should be possible to create a new lilo.conf file and reinstall lilo to the drive without chrooting.

The first thing I would do is create a disk image using the dd command. If possible I would want to test with another disk to prevent further damage to the original. Using the existing contents of the /boot directory you can build a lilo.conf file like the following.

http://www.control-escape.com/linux/lilo-cfg.html

Then run the lilo command from a system rescue CD. By specifying the parameters on the command line it will not look for the defaults.

http://linux.die.net/man/8/lilo

Since the system is proprietary this is all a guess and I can not say if it will work or not.
 
Old 12-09-2015, 07:22 AM   #13
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks, michaelk, I will try it.
 
Old 02-23-2016, 11:18 AM   #14
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Back to the problem.

I created a virtual machine on VirtualBox with a copy of the disk, and it worked as expected, returning the same error as the real disk.
Then I started the virtual machine from a Live CD (Salix Live Mate, as it uses lilo) and, looking at the contents of the /root folder on the copy of the disk, I created a config file like the one below

Code:
boot=/dev/sda
bitmap=/run/media/one/ec3c7e92-7d49-42e0-8ae8-ffe59bd02d9c/boot/bootsplash.bmp
map=/run/media/one/ec3c7e92-7d49-42e0-8ae8-ffe59bd02d9c/boot/map
install=/run/media/one/ec3c7e92-7d49-42e0-8ae8-ffe59bd02d9c/boot/boot-bmp.b
prompt
timeout=50
image=/run/media/one/ec3c7e92-7d49-42e0-8ae8-ffe59bd02d9c/boot/linux
	label=linux
	root=/dev/sda2
	read-only
The I ran: sudo lilo -C config and rebooted the virtual machine, after ejecting the live CD.

The virtual machine started normally but stopped with the following message:
Code:
VFS: Cannot open root device "802" or unknown-block(8,2)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount fs on unknown-block(8,2)
After some looking around I thought it could be a result of the live CD calling sda2 to what the system on the disk calls hda2, so I used:
Code:
linux root=/dev/hda2
at the next boot, and this time it returned:
Code:
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory:152k freed
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mounting the disk on the Salix and uncompressing the fs.img.gz file I get an fs.img file and the message:
Code:
gzip: fs.img.gz: decompression OK, trailing garbage ignored.
Mounting that image I can see an /sbin/init file, so I don't know what to do now.

Thanks in advance for any help.
 
Old 02-28-2016, 11:39 AM   #15
ArMaP
LQ Newbie
 
Registered: Dec 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
Nobody has any idea of what I could try next?
 
  


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
Xpert in 8-16 bit microcontroller embedded system now inclining toward embedded linux priyadarshan Linux - Embedded & Single-board computer 2 02-12-2009 04:28 AM
LXer: Embedded Linux as Dependable for Developers as RTOSes, says Embedded Market For LXer Syndicated Linux News 0 01-23-2008 11:40 AM
Booting Embedded DSL on Windows jerryvb DamnSmallLinux 3 12-12-2006 11:03 PM
Problem booting my new kernel in an embedded system Fernando Linux - General 1 07-02-2002 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 12:19 AM.

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
Open Source Consulting | Domain Registration