LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-18-2006, 03:35 PM   #1
imag
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Rep: Reputation: 0
LiveCD to Compact Flash Card. Can it be done?


I have this custom LiveCD (from PCLinuxOS)of my system exactly like I need. Now, I'd like to "embed" it onto a CF card.

At first I tried copying everything from CD-rom(/mnt/cdrom) to the Compact Flash(/mnt/hda1)...

$> cp -Rf /mnt/cdrom/* /mnt/hda1

When it booted from the CF, it just spit out a bunch of 99's on the screen and froze.

I'm thinking a boot loader also needs to be installed somewhere.

Anyone know of any tools or techniques to accomplish a LiveCD to a compact flash card?

Thanks.
 
Old 01-18-2006, 04:14 PM   #2
beagle2
Member
 
Registered: Aug 2004
Location: Aberdeen Scotland
Distribution: elive,sidux,xp,pclinuxos super gamer, mandriva 2007
Posts: 417

Rep: Reputation: 30
Look here for some info http://wiki.debian.org/BootUsb, might give you some ideas :-)
 
Old 01-19-2006, 01:36 PM   #3
imag
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
Well, I think I have another option that I'm going to try tonight...

- Install PClinuxOS to hard drive.
- Make changes (wallpaper, startup scripts, add/remove additional software, etc)
- Create a new image of my new "liveCD" using the PClinuxOS utility mkliveCD. This creates iso image.
- insert my compact flash card into hda using ide-to-CF adaptor.
- dd if=/mnt/hda3/my-newLiveCD.iso of=/mnt/hda (assuming hda is where CF is installed).
- Boot from new CF.
- Profit (I hope).

wish me luck.
 
Old 01-19-2006, 06:26 PM   #4
bandersnatchy
Member
 
Registered: May 2004
Location: USA-Calif
Distribution: KANOTIX!
Posts: 48

Rep: Reputation: 15
imag

Please take a couple minutes to post the news of your success here.

Also, any tips would be appreciated, including the model of IDE-to-Compact Flash adapter you used (Addonics?).

Good Luck!
 
Old 01-20-2006, 09:38 AM   #5
imag
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
Well, I'm a little stuck now. I'll be brief.
I can make the iso image of my remastered PClinuxOS with the mklivecd utility. I've called it mynew.iso. And I can successfully burn the iso to a CD and boot. Hooray!!

Here's the contents of the remastered CD...
isolinux <-- a directory.
livecd.sqfs <-- one big file.
A du on this LiveCD shows it to be about 412MB, small enough for my CF.

I can partition my compact flash card successfully (512MB Lexar) with 1 big partition and format it with a ext2 filesystem. Hooray, m-kay?

And here's what I've tried with no success....
Here's some specs first:
CF (hda)
cdrom (hdd) is my LiveCD remaster
Hard Drive (hdc) to store the images and anything else.

1. cp /mnt/cdrom/* /mnt/hda1 <-- copy content of the live cd to the CF. Boot from the CF. No good.

2. dd if=/mnt/hdc1/mynew.iso of=/mnt/hda1 <-- Pretty much the same as above I think. Doing this, I can see the two files (isolinux directory and the livecd.sqfs).
Boot from flash.... fail. Can't boot.

3. Even tried dd if=/dev/hdd of=/dev/hda1 and again failed to boot.

So then I tried to copy the mbr from the live CD (hdd) using
dd of=/mnt/hdc/mbr.img if=/dev/hdd bs=512 count=1 <-- seemed to work. Got a file.

Then to load the mbr to the CF...
dd if=/mnt/hdc/mbr.img of=/dev/hda
Doing this erased the entire partition on the CF!! fdisk /dev/hda shows nuttin'. Uggh!

I searched and found a couple of howto's and tutorials, one for doing this from a Knoppix based liveCD but PClinuxOS does it different from knoppix. Again, the contents of my remastered PClinuxOS cd is just one directory and one big squashed file. The contents of the Knoppix liveCD's are very different. So I couldn't follow the instructions well.

I'm sure my problem is setting up a correct mbr, but I'm kinda dumb and don't really understand the whole boot process. But I sure would love to embedd my remastered liveCD.

Don't know right now what the ide-to-CF name brand is. I'll check later. In the past, I've installed dsl (damn small linux) to the CF just like a regular HD install, and it works, but there's a lot of writes to the CF that I know ain't good for it. I need it to be read-only loading the OS into memory (1G).

Any suggestions anyone?
 
Old 01-20-2006, 01:53 PM   #6
imag
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
Well, I've been digging for answers to my problem and I'm coming more to the conclusion that it could very well be just a bootup issue. My LiveCd uses syslinux as the bootloader. I've always used lilo and sometimes grub. So googling for "boot syslinux" reveals a CF HOWTO...

http://thinstation.sourceforge.net/CF-HOWTO-2.html

which I'm going to try tonight. The only step that might give me a problem is step 5...

>>
STEP 5:
Run TS-O-Matic and choose the SYSLINUX boot deployment option. Then download each file and copy it to
the CF card without modification or renaming.
<<

I'm thinking that my "Step 5" will be...
Copy the livecd.sqfs file from the CD to the CF.


I hope this works. Ideally, I'd liike to use lilo instead as the bootloader just because it's what I'm used to and the fact that syslinux only installs on FAT16, vfat filesystems (yucky!!). Perhaps I'll try later, but for know, I just want to get my liveCd embedded and booted and I don't care how. I'll follow up on this. If I get this to work, I think I'd like to submit a nice HOWTO for other embedded newbies like me. What better way to inspire and promote innovative ideas when you have an easy-to-follow roadmap. Todays newbies are tomorrows masters. And unfortunatley, too many good ideas are lost and not implemented from just not knowing how to accomlish them.
 
  


Reply



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
Booting from a Compact Flash card FLLinux Linux - Newbie 16 06-10-2006 12:49 PM
Recoving compact flash card phantompgr Linux - Hardware 4 08-03-2005 05:14 PM
Mounting a Compact Flash Card Kyl3 Slackware 3 05-26-2004 06:48 PM
compact flash card reader mindcry Linux - Hardware 45 02-03-2004 08:14 PM
PC Card, compact flash figadiablo Linux - Hardware 0 02-21-2003 08:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:59 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
Open Source Consulting | Domain Registration