* Re: [Qemu-devel] qemu and already installed OS
2004-03-19 11:57 [Qemu-devel] qemu and already installed OS vaise
@ 2004-03-19 11:11 ` Thomas Glanzmann
2004-03-19 12:46 ` vaise
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Glanzmann @ 2004-03-19 11:11 UTC (permalink / raw)
To: qemu-devel
Hi,
> dd if=/dev/hda1 of=/home/me/partitionhda.img
In order to boot from this you need a boot sector (partitiontable).
Which means you have to a dd if=/dev/hda of=/path/to/img
~~~ -> without the appended '1'
> should I have added some extra options to dd ? (like bs= count= ?)
Specifying a bigger blocksize could speedup things but don't specifying
one shouldn't do any harm but killing your time. :-)
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] qemu and already installed OS
@ 2004-03-19 11:57 vaise
2004-03-19 11:11 ` Thomas Glanzmann
0 siblings, 1 reply; 12+ messages in thread
From: vaise @ 2004-03-19 11:57 UTC (permalink / raw)
To: qemu-devel
I used dd on a working partition, created a file and lauched qme...
dd if=/dev/hda1 of=/home/me/partitionhda.img
but the boot fails :
Disk I/O error
Replace the disk, and then prees any key
should I have added some extra options to dd ? (like bs= count= ?)
Did it work for you ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] qemu and already installed OS
2004-03-19 11:11 ` Thomas Glanzmann
@ 2004-03-19 12:46 ` vaise
2004-03-19 13:24 ` vaise
2004-03-19 13:58 ` [Qemu-devel] [small help] dd, mbr, fdisk Sebastien Bechet
0 siblings, 2 replies; 12+ messages in thread
From: vaise @ 2004-03-19 12:46 UTC (permalink / raw)
To: qemu-devel
On Friday 19 March 2004 11:11, Thomas Glanzmann wrote:
> In order to boot from this you need a boot sector (partitiontable).
> Which means you have to a dd if=/dev/hda of=/path/to/img
> ~~~ -> without the appended '1'
Good, good !
It means that I have to copy the whole disk, or approximatively a file bigger
than my partition.
Of course there must be some tools to save only the boot sector and the
partition wanted.
But I don't need to do a very clean job today, so that should be perfect for
this time.
thank you Thomas.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] qemu and already installed OS
2004-03-19 13:24 ` vaise
@ 2004-03-19 12:47 ` Rudi Lippert
2004-03-19 13:12 ` Thomas Glanzmann
2004-03-19 14:17 ` [Qemu-devel] " Sami Haahtinen
2 siblings, 0 replies; 12+ messages in thread
From: Rudi Lippert @ 2004-03-19 12:47 UTC (permalink / raw)
To: qemu-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 19 March 2004 14:24, vaise@votreservice.com wrote:
> the only message is "L"
> I must be wrong somewhere...
what are you complaining about? most programs give you one letter less than
that in case of an error ;o)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAWuvj1nTg39QS/TsRAlLeAJ0Ya79ACiCH6DN4vgJ6LpASEycglwCfUxin
hq/2MnveUCSbQ6xyFJzErEk=
=KY4J
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] qemu and already installed OS
2004-03-19 13:24 ` vaise
2004-03-19 12:47 ` Rudi Lippert
@ 2004-03-19 13:12 ` Thomas Glanzmann
2004-03-20 10:09 ` vaise
2004-03-19 14:17 ` [Qemu-devel] " Sami Haahtinen
2 siblings, 1 reply; 12+ messages in thread
From: Thomas Glanzmann @ 2004-03-19 13:12 UTC (permalink / raw)
To: qemu-devel
Hi,
> dd if=/dev/hda of=/home/me/disk.img bs=1024 count=1600000
~~~~~~~~~~~~~
drop that count parameter.
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] qemu and already installed OS
2004-03-19 12:46 ` vaise
@ 2004-03-19 13:24 ` vaise
2004-03-19 12:47 ` Rudi Lippert
` (2 more replies)
2004-03-19 13:58 ` [Qemu-devel] [small help] dd, mbr, fdisk Sebastien Bechet
1 sibling, 3 replies; 12+ messages in thread
From: vaise @ 2004-03-19 13:24 UTC (permalink / raw)
To: qemu-devel
On Friday 19 March 2004 12:46, vaise@votreservice.com wrote:
> On Friday 19 March 2004 11:11, Thomas Glanzmann wrote:
> > In order to boot from this you need a boot sector (partitiontable).
> > Which means you have to a dd if=/dev/hda of=/path/to/img
> > ~~~ -> without the appended '1'
> It means that I have to copy the whole disk, or approximatively a file
> bigger than my partition.
dd if=/dev/hda of=/home/me/disk.img bs=1024 count=1600000
It does not boot either...
the only message is "L"
I must be wrong somewhere...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] [small help] dd, mbr, fdisk
2004-03-19 12:46 ` vaise
2004-03-19 13:24 ` vaise
@ 2004-03-19 13:58 ` Sebastien Bechet
1 sibling, 0 replies; 12+ messages in thread
From: Sebastien Bechet @ 2004-03-19 13:58 UTC (permalink / raw)
To: qemu-devel
where myhdsize is your harddisk size in Mo :
HDS = myhdsize / 512
$ dd if=/dev/zero of=virtualhardisk.hd bs=2048 count=HDS
$ install-mbr virtualhardisk.hd # apt-get install mbr ...
$ cfdisk virtualhardisk.hd
[Do what you want with your hard disk & qemu ...]
Then you can use (for your "hda1") :
losetup -o 32256 /dev/loop0 virtualhardisk.hd
mount /dev/loop0 /mnt/temp
[...]
umount /mnt/temp
losetup -d /dev/loop0
Bye.
--
Sebastien Bechet <s.bechet@av7.net>
av7.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] Re: qemu and already installed OS
2004-03-19 13:24 ` vaise
2004-03-19 12:47 ` Rudi Lippert
2004-03-19 13:12 ` Thomas Glanzmann
@ 2004-03-19 14:17 ` Sami Haahtinen
2004-03-20 10:11 ` vaise
2 siblings, 1 reply; 12+ messages in thread
From: Sami Haahtinen @ 2004-03-19 14:17 UTC (permalink / raw)
To: qemu-devel
vaise@votreservice.com wrote:
> dd if=/dev/hda of=/home/me/disk.img bs=1024 count=1600000
> It does not boot either...
> the only message is "L"
> I must be wrong somewhere...
That would be your lilo, grab the kernel from the partition, put it
somewhere, load that kernel image with qemu (with the appropriate
parameters, you can get them from lilo conf, it's the append line) and
fire away.
once you get it to boot, reinstall lilo.
i can't really tell you the commands how to do this, as i'm not at home
to check them.
Regards, Sami
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] qemu and already installed OS
2004-03-19 13:12 ` Thomas Glanzmann
@ 2004-03-20 10:09 ` vaise
2004-03-23 13:10 ` vaise
0 siblings, 1 reply; 12+ messages in thread
From: vaise @ 2004-03-20 10:09 UTC (permalink / raw)
To: qemu-devel
On Friday 19 March 2004 13:12, Thomas Glanzmann wrote:
> > dd if=/dev/hda of=/home/me/disk.img bs=1024 count=1600000
> drop that count parameter.
It means I will save my whole (and only) hard disk ? ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] Re: qemu and already installed OS
2004-03-19 14:17 ` [Qemu-devel] " Sami Haahtinen
@ 2004-03-20 10:11 ` vaise
2004-03-20 12:05 ` Sami Haahtinen
0 siblings, 1 reply; 12+ messages in thread
From: vaise @ 2004-03-20 10:11 UTC (permalink / raw)
To: qemu-devel
On Friday 19 March 2004 14:17, Sami Haahtinen wrote:
> > dd if=/dev/hda of=/home/me/disk.img bs=1024 count=1600000
> > It does not boot either...
> > the only message is "L"
> > I must be wrong somewhere...
>
> That would be your lilo, grab the kernel from the partition, put it
> somewhere, load that kernel image with qemu (with the appropriate
> parameters, you can get them from lilo conf, it's the append line) and
> fire away.
>
How do you "grab the kernel" ?
I tried "dd if=/dev/hda", but as I said, lilo crash....
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Qemu-devel] Re: qemu and already installed OS
2004-03-20 10:11 ` vaise
@ 2004-03-20 12:05 ` Sami Haahtinen
0 siblings, 0 replies; 12+ messages in thread
From: Sami Haahtinen @ 2004-03-20 12:05 UTC (permalink / raw)
To: qemu-devel
vaise@votreservice.com wrote:
> On Friday 19 March 2004 14:17, Sami Haahtinen wrote:
>>That would be your lilo, grab the kernel from the partition, put it
>>somewhere, load that kernel image with qemu (with the appropriate
>>parameters, you can get them from lilo conf, it's the append line) and
>>fire away.
>>
>
> How do you "grab the kernel" ?
> I tried "dd if=/dev/hda", but as I said, lilo crash....
Ok, i found a neater way for you to do that.. ;)
go to: http://www.lnx-bbc.org/download.html fetch the iso image.
boot with the image, log in as root. mount your partition, and chroot to it:
mount /dev/hda1 /tmp
chroot /tmp /bin/sh
If you have other filesystems you are forced to mount, you shouldn't
really do this unless you have to. If you do this, you need to clean up
before you go:
mount -a
Re-install lilo by running lilo.
Back out once again:
exit (exit back to lnx-bbc)
umount /tmp
sync (i like to play it safe)
shutdown the system and boot up without the bootable CD-Image.
That's the quick tour on recovering from a HD failure, there are better
howtos for this, but if you are clever you should be able to do it with
this.
-- Sami
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] qemu and already installed OS
2004-03-20 10:09 ` vaise
@ 2004-03-23 13:10 ` vaise
0 siblings, 0 replies; 12+ messages in thread
From: vaise @ 2004-03-23 13:10 UTC (permalink / raw)
To: qemu-devel
On Saturday 20 March 2004 10:09, vaise@votreservice.com wrote:
> On Friday 19 March 2004 13:12, Thomas Glanzmann wrote:
> > > dd if=/dev/hda of=/home/me/disk.img bs=1024 count=1600000
> >
> > drop that count parameter.
>
> It means I will save my whole (and only) hard disk ? ?
>
Thomas, you were right !
In order to copy the partition with dd, and to manage to boot, we have to
copy :
-the boot sector (if=/dev/hda and not if=/dev/hda1)
-the target partition for qemu (of course)
-AND the linux partition where grub comes from.
I managed to store these 3 things in the begining of the hard disk, so it
takes me only 2.5Gb. correct.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-03-23 12:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-19 11:57 [Qemu-devel] qemu and already installed OS vaise
2004-03-19 11:11 ` Thomas Glanzmann
2004-03-19 12:46 ` vaise
2004-03-19 13:24 ` vaise
2004-03-19 12:47 ` Rudi Lippert
2004-03-19 13:12 ` Thomas Glanzmann
2004-03-20 10:09 ` vaise
2004-03-23 13:10 ` vaise
2004-03-19 14:17 ` [Qemu-devel] " Sami Haahtinen
2004-03-20 10:11 ` vaise
2004-03-20 12:05 ` Sami Haahtinen
2004-03-19 13:58 ` [Qemu-devel] [small help] dd, mbr, fdisk Sebastien Bechet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).