LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Embedded Linux not booting (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/embedded-linux-not-booting-4175560673/)

ArMaP 12-04-2015 03:59 PM

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. :)

michaelk 12-04-2015 04:27 PM

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?

astrogeek 12-04-2015 04:38 PM

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.

Soadyheid 12-04-2015 04:45 PM

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!

:hattip:

ArMaP 12-04-2015 05:43 PM

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.

michaelk 12-04-2015 05:54 PM

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?

ArMaP 12-04-2015 06:19 PM

Sorry, I don't remember any files at the moment, and I can only see them on Monday.

Sorry.:redface:

Soadyheid 12-05-2015 12:28 PM

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!

:hattip:

ArMaP 12-05-2015 03:21 PM

Quote:

Originally Posted by Soadyheid (Post 5460279)
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. :(

ArMaP 12-07-2015 07:04 AM

Back at work, these are the files on the boot directory:

boot-bmp.b
bootsplash.bmp
fs.img.gz
linux
map
System.map

ArMaP 12-09-2015 06:01 AM

Anyone?

michaelk 12-09-2015 07:19 AM

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.

ArMaP 12-09-2015 07:22 AM

Thanks, michaelk, I will try it. :)

ArMaP 02-23-2016 11:18 AM

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. :)

ArMaP 02-28-2016 11:39 AM

Nobody has any idea of what I could try next? :(


All times are GMT -5. The time now is 06:39 PM.