Linux - NewbieThis 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
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.
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
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.
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
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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.