LinuxQuestions.org
Review your favorite Linux distribution.
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 08-09-2009, 12:21 PM   #1
JonathanWilson
Member
 
Registered: Aug 2009
Location: Ilkeston, England
Distribution: ubuntu, xp, embeded
Posts: 79

Rep: Reputation: 1
qemu raw file formatting and partitioning.


Outline...

I currenty have a number of WD Mybook worlds which run an embeded linux system on Arm926ej as NAT devices.

Now I have come up against some "limitations" on the new versions, namely that the WD supplied software doesnt support pluging in usb file systems other than fat32, dos, ntfs. Now quite why they don't by default is beyond me... but I'm guessing that as its a "consumer" device its really intended for a windows home environment.

Now while I have been playing with 1 stripped down box, so i can remove/re-create the original file system every time I break it I have come up against a few problems, the main one is that the busybox (shell) has a lot of the options turned off so I had an idea to use qemu to run the WD and linux software on my pentium linux system so I could change things to my hearts content and every time I broke it I'd just have to re-create the raw disk instead of moving hardware around.

Problem.

Having studied qemu it seems that the raw format is basicaly a file mimicking a disk, in much the same way a CD image can be copied to a hd as a file using DD; infact as far as I can see it should be possible to DD my WD disk to a file, and then use qemu to boot it.

Where this all goes horibly wrong is the WD disk is huge (1TB) and all I really need is the first 3 partitions, and blank space prior to partition 1 (approx 8GB), and manually create partition 4 to a size more sutible, say 20G.

Question.

Now if i'm correct about linuxes everything is a file, it should be possible to somehow make the os see the file as a disk (loop device?, or some other method) and then partition/format/DD into the file.

My question is how?

I did try using "mount, -o loop..."(as described on a web page I found) but that doesnt work because obviously the file is empty to start with and mount requires a partition type, so some how I need to fool linux into seeing "myfile.dta" as "/dev/hdx" so I can use the standard partitioning tools.

Any help much appreciated.
 
Old 08-09-2009, 01:43 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I brlieve in mounting a partition img, you need to mount it as "hda", not hda1, etc
http://ubuntuforums.org/archive/index.php/t-136943.html

http://equivocation.org/node/107

http://qemu-forum.ipi.fi/viewtopic.php?f=4&t=40&p=407

some distro's can mount the img's better than others
in that some have more stuff associated with img's
like tinycore
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
partitioning qemu-img; share your wisdom and what you got on vhd? linus72 Linux - General 3 06-14-2009 10:41 AM
qemu dificulty with formatting image jmite Linux - Software 4 08-23-2008 04:24 PM
Formatting and Partitioning?!?!? JonnyBlazed Linux - Newbie 4 07-21-2004 01:05 PM
Partitioning and formatting ??? BajaNick General 5 12-25-2003 09:57 PM
partitioning ok, but formatting no go..... beginnerx Linux - Newbie 6 09-29-2003 11:00 AM

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

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