LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2008, 03:04 PM   #1
trailer8713
Member
 
Registered: Jun 2007
Distribution: Fedora 9
Posts: 109

Rep: Reputation: 15
chown cf/sd card


I am trying to mount a bz2 file to a cf card or sd card with a ext2 partition it will not allow me to put anything on that partition. I tried chmod -R 766 /media/disk-1 but that does not appear to have worked is there another or better way. to do this so I can write to the partition.
Thank you
 
Old 11-06-2008, 03:10 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
I am trying to mount a bz2 file to a cf card or sd card
I don't understand what you mean by this. You mount a filesystem on a mountpoint.
Is this a kernel, that you want to write to the device itself so it will boot? If you want to create an image on the device, then use the "dd" command as root.
 
Old 11-06-2008, 03:37 PM   #3
trailer8713
Member
 
Registered: Jun 2007
Distribution: Fedora 9
Posts: 109

Original Poster
Rep: Reputation: 15
Yes I am trying to load GPE on my ipaq with haret I had this done with SDG I guess SDG is not supported by angstrom so I need to use Haret I have haret and the zimage on the fat 16 partition but I need to get the bz2 kernel on the ext2 partition and I am having a difficult time doing this. I need to copy the package and untar it to the ext2 partition. can you tell me how to do this or can you elaborate with this dd command?
Please and thank you
 
Old 11-06-2008, 04:23 PM   #4
trailer8713
Member
 
Registered: Jun 2007
Distribution: Fedora 9
Posts: 109

Original Poster
Rep: Reputation: 15
I tried
cd Download
[craig@localhost Download]$ sudo dd if=Angstrom-x11-image-glibc-ipk-2007.12-hx4700-rootfs.img.bz2 of=/dev/sdb2
It still didn't write to the card should that have work on a ext2 partition.
 
Old 11-06-2008, 05:30 PM   #5
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Are so many '-' in the filename ok?

Seems to be a simple permission problem.

Try as root

Last edited by amani; 11-06-2008 at 05:32 PM.
 
Old 11-06-2008, 06:35 PM   #6
trailer8713
Member
 
Registered: Jun 2007
Distribution: Fedora 9
Posts: 109

Original Poster
Rep: Reputation: 15
that is the file name it is the kernel for a PDA, that is the file or tarred package name in the Download folder.
I believe sudo is root
It erased the ext2 partition when I tried it.
Thank you and please correct me if I am wrong.
 
Old 11-07-2008, 01:23 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I'm afraid that I don't know what GPE, SDG or Haret are.

Are you sure the image you want isn't supposed to be the bunzipped file. It may be compressed to reduce bandwidth. You really need to find a README associated with the file. Probably on the site where you obtained the file.

If the file is the image of a filesystem and you want to replace the current filesystem with the uncompressed file, then use bzcat to uncompress it and use that as an input to dd.

bzcat <filename> | sudo dd -of /dev/sdb2

On the other hand if this is a kernel, you may need to save either the file or the uncompressed file to the filesystem.
Look at the output of "sudo file -s /dev/sdb2". You may have trashed the filesystem with what you have done already. If the filesystem is ext3, and not corrupt and doesn't have features your kernel version doesn't understand, then you should be able to mount it read/write.
Check the ouput of "mount | grep sdb2". It will indicate if the filesystem is mounted read/write or read-only.

I don't know if you are certain whether this file is an image or a regular file. An image contains the filesystem as well as the files. It is a bit-for-bit copy of an entire filesystem. If you have an ext3 filesystem on /dev/sdb2 and you overwrite /dev/sdb2 with an image of a fat32 system, you will in effect be reformatting the partition in fat32 and populating it with files.

I don't think that a bzip'ed file would be a filesystem, however. One possibility is that this file is an early 2.4 Linux kernel. Back when a kernel would fit on a floppy disk, you could write the kernel to the floppy device, starting at block 0. The code at the start of the kernel would contain the instructions to uncompress the rest of the kernel and load in the intrd file from a second floppy.

Last edited by jschiwal; 11-07-2008 at 01:30 AM. Reason: moved sudo to second command, after the pipe character.
 
Old 11-07-2008, 01:29 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Rereading your response and paying attention to the name of the filename, the "fs" I believe stands for "file system" and the ".img" stands for image file. So I think using "bzcat Angstrom-x11-image-glibc-ipk-2007.12-hx4700-rootfs.img.bz2 | dd of=/dev/sdb2" will work. su to root first.

If you are using Ubuntu and don't have "su", then you can use:
bzcat Angstrom-x11-image-glibc-ipk-2007.12-hx4700-rootfs.img.bz2 | sudo dd of=/dev/sdb2

Note that the sudo command is after the pipe.

This command will over-write any filesystem on the /dev/sdb2 device. A filesystem also has a size. If the expanded filesystem is smaller than your partition, then you will have unused space on your sd card.

Also, could you indicate what is on /dev/sdb1? It seems odd to me that a device would use the second partition.

One last thing. Don't use ext3 or any other journalled filesystem on a cf card. You can use ext2. The journalling process will cause a journal to increase the robustness of the filesystem. On a cf device however, this will cause extra writes which you want to avoid. Also, writes are different to a flash device. Larger chunks are rewritten to the device at a time, and writes are very slow as a result compared to reads.

Last edited by jschiwal; 11-07-2008 at 01:43 AM.
 
Old 11-07-2008, 08:29 AM   #9
trailer8713
Member
 
Registered: Jun 2007
Distribution: Fedora 9
Posts: 109

Original Poster
Rep: Reputation: 15
The first partition is the Haret Bootloader and the zimage.bin file on a fat 16 partition thank you for your response and attention to detail. This is what some of us (me) newer users need to try to understand exactly what we are doing. I am not an IT administrator so I don't always understand the terminology
That was great
again thank you
 
  


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
chown rust8y Solaris / OpenSolaris 3 11-02-2007 04:04 PM
chown loopoo Linux - Newbie 5 08-09-2005 09:38 AM
Chown -R Jakeh2k1 Linux - General 3 10-31-2004 04:23 PM
chown -R ujotne Programming 3 02-25-2004 12:02 PM
chown Sathe Linux - General 13 10-14-2002 11:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 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