Continuing with the ISO discussion, I wanted to document my experiences.

First, I used the lfslivecd-x86_64-6.3-r2160-updated-nosrc.iso to start. 
  It booted without problem with qemu-1.40.  I used:

ARGS="-enable-kvm -hda lfs73.img"
CDROM="-cdrom lfslivecd-x86_64-6.3-r2160-updated-nosrc.iso -boot d"
NIC="-net nic -net tap"
MEM="-m 2G"

sudo qemu $ARGS $CDROM $NIC $MEM

The issues I had are the same for any iso.  I can't add a user 
(typically lfs) and have it stay.  It needs that at every boot.  The 
same goes for creating /mnt/lfs.  Starting sshd creates new keys and 
requires a little extra work when connecting from another client.

I don't know of any way to work around that with a read only device. 
I'm only mentioning it in passing.

When I created lfs73.img, I made it 10G.  I then partitioned it as 
normal.  I wanted the root partition, /boot, swap, and some extra space. 
  After building lfs, I realized I made an error and the /boot partition 
was only 8M.  I then tried to move things around using the livecd.  That 
is pretty tricky and I ended up trashing the virtual drive, so I started 
over using gdisk.  This is the layout I ended with:

Disk /dev/hda: 20971520 sectors, 10.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 20688F3D-5CE4-4F7E-8B32-C6895DF3D415
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 20971486
Partitions will be aligned on 1-sector boundaries
Total free space is 2048 sectors (1024.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
    1            2082            4129   1024.0 KiB  EF02  BIOS boot part
    2            4130          208929   100.0 MiB   8300  Linux fs
    3          208930         8392737   3.9 GiB     8300  Linux fs
    4         8392738        11968424   1.7 GiB     8200  Linux swap
    5        11968425        20971486   4.3 GiB     8300  Linux fs

Note that the drive is hda.  On the first boot (using the above virtual 
commands without CDROM),  the kernel panic-ed because it could not find 
the root partition.  The screen output gave me a hint:

[    0.381493] Uniform Multi-Platform E-IDE driver
[    0.382392] piix 0000:00:01.1: IDE controller (0x8086:0x7010 rev 0x00)
[    0.383322] piix 0000:00:01.1: not 100% native mode: will probe irqs 
later
[    0.384592] pci 0000:00:01.1: setting latency timer to 64
[    0.384615]     ide0: BM-DMA at 0xc040-0xc047
[    0.385458]     ide1: BM-DMA at 0xc048-0xc04f
[    0.386278] Probing IDE interface ide0...
[    0.650183] hda: QEMU HARDDISK, ATA DISK drive
[    1.262245] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4

I'm not sure why the kernel not finding it as a sata drive, but I'm sure 
it's something to do with the kernel configuration.  The qemu emulated 
hw is just different from the actual hw on my system.

In any case, this is getting a little long.  I am able to boot to a full 
lfs system including networking, but the configuration is just not what 
I want.  I'll post more when I find out more.

   -- Bruce


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to