Linux - Embedded & Single-board computerThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,648
Rep:
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.
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.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,648
Rep:
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.
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.
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
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.