NCBox CF Booting Solved.

More
05 Oct 2014 21:33 - 05 Oct 2014 22:16 #51803 by midworld08
Getting the NCbox to boot off the CF card seemed to prove rather problematic. I have finally solved this, well I have managed to use the same set of instructions to transfer the image to the 4 different CF cards I have, including an 800x unit that I could not get to boot previously, and man does it boot faster than the 200x and run so much better.

dd ing the image across probably does still work, and its a matter of setting up grub correctly with steps 4 onwards.

Hope this helps, it should work with any CF system.

Col
Attachments:
Last edit: 05 Oct 2014 22:16 by midworld08. Reason: Outdated file attached.
The following user(s) said Thank You: matterest

Please Log in or Create an account to join the conversation.

More
06 Oct 2014 00:02 #51808 by matterest
Replied by matterest on topic NCBox CF Booting Solved.
I can't get your attachment to open

Please Log in or Create an account to join the conversation.

More
06 Oct 2014 06:59 #51811 by midworld08
Replied by midworld08 on topic NCBox CF Booting Solved.
Seems the forum is not working right.... you can't download it, it was just a text file. Note you can use this on a USB as well.

Here it is;

Step 1
First format the CF to ext2. This example will not use multiple partitions on the CF. I use Gparted to make quick work of this.

Step 2
Open a terminal, and set yourself up as su, and mount the CF, and ncbox image. Note my cf card is listed as sdg1 here. Please replace with your cf card designation.

#sudo su
#mount /dev/sdg1 /media/cf
#mount -o loop /media/XXXX/XXXX/NCBOX-8.04-2.6.30-vortex86mx-rtai-lcnc-2.5.2.img /media/ncbox

Step 3
First check that you are using Grub 0.97. These instructions are only for 0.97.

#grub-install --version
grub-install (GNU GRUB 0.97)

Copy across files
cp -r -p /media/ncbox/* /media/cf

Step 4
I subsequently found that the version of Grub I used was actually looking for grub.conf. Create a link so that both filenames are there but are actually the same file;

#ln -T /media/cf/boot/grub/menu.lst /media/cf/boot/grub/grub.conf

Step 5
Next there is a slight complication in that grub kind-of assumes that you're installing it on the system that it's going to run on. In our case this isn't so. Whatever the Compact Flash card is appearing as now, once we plug it into the target system it will become (hd0) and our boot partition will be (hd0,0). Luckily this is easily solved by creating a mapping file and telling grub to use that.

#cd /media/cf
#echo '(hd0) /dev/sdX' >grub-device.map

Step 6
Time to run Grub pointing to the grub-device.map

#grub --device-map=grub-device.map

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub>

Next we tell grub that we want to boot the operating system on the first partition on the first disk. In grub terms this is partition 0 on disk 0.

grub> root (hd0,0)

Some people report a statis, mine does not. Any sort of an error, and you have to stop and find out where you went wrong. Most likely, you did not set the device.map file up correctly pointing to your CF card, mine abouve shown as sdX.

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.

grub> quit

You now have a Compact Flash that should boot

Step 7:
Edit the menu.lst and set up the root=UUID= options so that it has the correct number here for the CF card.

#gedit /media/cf/boot/grub/menu.lst

Step 8

unmount all the drives before removal.
#umount /media/cf
#umount /media/ncbox
The following user(s) said Thank You: ArcEye, tkamsker

Please Log in or Create an account to join the conversation.

More
06 Oct 2014 18:04 #51819 by ArcEye
Replied by ArcEye on topic NCBox CF Booting Solved.
Well done, afraid I didn't have the incentive to get to the bottom of it, not using the box for anything.

If you fancy dd'ing a working card to an image and zipping it, I will host it again (and give you the credit of course)
The main problem is getting the image to a size that is manageable

The easiest way is probably something like

dd if=/dev/sdX of=/home/col/NCBOX.iso bs=1024 count=3500K

You cannot use decimal points in the count= figure, so the easiest way is to specify a block size of 1K to make calculating easier and use 3500K if you want 3.5GB, or just 4M for instance if you want 4GB

The size needs to be the size of the file system plus some running overhead, 0.25 GB is fine, it is not as if space is limited on these cards these days, just needs to fit into a reasonable partion space.

PM me with the file location if you do this.

regards

Please Log in or Create an account to join the conversation.

More
03 Nov 2014 00:11 #52695 by midworld08
Replied by midworld08 on topic NCBox CF Booting Solved.
Here is a link to a Google drive folder.

drive.google.com/folderview?id=0By16u16K...QZlVwRUU&usp=sharing

Anyone with the link can access the folder, and download the image. Its a 1.6G gzip of a dd.

I have tested the image onto another CF card, and it booted no problems.

The image contains Kernel 2.6.30, compiled for the NCbox, Vortex CPU. It also contains a rip install of Linux CNC 2.7, without the USB support. This version is set up so that it connects to the old repositories so that synaptic works seemlessly on updating and installing, along with apt-get. It also has LXDE and a few other window managers to help make things run a bit faster. It defaults to gnome however.

I'll be adding another image soon, of the standard 2.6 version of Linux CNC, which is not rip install. Will send an update when this is done.

If you check the folder and the file is not there yet, please give it a day to upload. I've only just set it going.
The following user(s) said Thank You: ArcEye, tkamsker

Please Log in or Create an account to join the conversation.

More
03 Nov 2014 00:18 #52696 by tkamsker
Replied by tkamsker on topic NCBox CF Booting Solved.
Hi,
thank you
midworld08 i get an 404 on your link maybe the points in the href are an error ,..

i am happily to try this and see if i get the latest 6.3 stable kernel to compile

thx thomas

Please Log in or Create an account to join the conversation.

More
03 Nov 2014 00:49 #52697 by ArcEye
Replied by ArcEye on topic NCBox CF Booting Solved.

Here is a link to a Google drive folder.

drive.google.com/folderview?id=0By16u16K...QZlVwRUU&usp=sharing

Anyone with the link can access the folder, and download the image. Its a 1.6G gzip of a dd.


I can get the url but the folder is not unlocked




I clicked on the request access button, but no idea what you will receive.
Attachments:

Please Log in or Create an account to join the conversation.

More
03 Nov 2014 01:13 #52698 by tkamsker
Replied by tkamsker on topic NCBox CF Booting Solved.
hi in my case i have google drive access but when i try to open link (in google ) drive it shows 404
but i may be windows issue i see in the link that the question mark is in my working link an %3 something

so probably mid world ttys it on another computer work or wife and see if it works there ;)-
thx
thomas

Please Log in or Create an account to join the conversation.

More
03 Nov 2014 17:32 #52713 by ArcEye
Replied by ArcEye on topic NCBox CF Booting Solved.
Got the new link thanks, all downloaded and unzipped

Will try writing to a card later

regards

Please Log in or Create an account to join the conversation.

More
03 Nov 2014 19:37 #52716 by ArcEye
Replied by ArcEye on topic NCBox CF Booting Solved.
Hi

The image downloads, unzips and writes OK

You get a GRUB menu and boot starts, but then hangs trying to resolve hda





Hopefully will get time to mount the image and have a look at it later

regards
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum