Xen On Funtoo From Scratch: Difference between revisions
From Xen
Jump to navigationJump to search
No edit summary |
|||
| Line 127: | Line 127: | ||
== Setup LVM == |
== Setup LVM == |
||
# pvcreate /dev/sda4 |
|||
Writing physical volume data to disk "/dev/sda4" |
|||
Physical volume "/dev/sda4" successfully created |
|||
# vgcreate data /dev/sda4 |
|||
Volume group "data" successfully created |
|||
# lvcreate -L40G -n root data |
|||
Logical volume "root" created |
|||
# lvcreate -L40G -n winxp data |
|||
Logical volume "winxp" created |
|||
== Setup Filesystems == |
|||
# mkfs.ext3 /dev/sda2 |
|||
mke2fs 1.41.14 (22-Dec-2010) |
|||
Filesystem label= |
|||
OS type: Linux |
|||
Block size=1024 (log=0) |
|||
Fragment size=1024 (log=0) |
|||
Stride=4 blocks, Stripe width=4 blocks |
|||
128016 inodes, 512000 blocks |
|||
25600 blocks (5.00%) reserved for the super user |
|||
First data block=1 |
|||
Maximum filesystem blocks=67633152 |
|||
63 block groups |
|||
8192 blocks per group, 8192 fragments per group |
|||
2032 inodes per group |
|||
Superblock backups stored on blocks: |
|||
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409 |
|||
Writing inode tables: done |
|||
Creating journal (8192 blocks): done |
|||
Writing superblocks and filesystem accounting information: done |
|||
This filesystem will be automatically checked every 29 mounts or |
|||
180 days, whichever comes first. Use tune2fs -c or -i to override. |
|||
# mkswap /dev/sda3 |
|||
Setting up swapspace version 1, size = 8388604 KiB |
|||
no label, UUID=57c33913-7b18-4696-aa9c-048176161866 |
|||
# mkfs.ext4 /dev/data/root |
|||
mke2fs 1.41.14 (22-Dec-2010) |
|||
Filesystem label= |
|||
OS type: Linux |
|||
Block size=4096 (log=2) |
|||
Fragment size=4096 (log=2) |
|||
Stride=1 blocks, Stripe width=1 blocks |
|||
2621440 inodes, 10485760 blocks |
|||
524288 blocks (5.00%) reserved for the super user |
|||
First data block=0 |
|||
Maximum filesystem blocks=4294967296 |
|||
320 block groups |
|||
32768 blocks per group, 32768 fragments per group |
|||
8192 inodes per group |
|||
Superblock backups stored on blocks: |
|||
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, |
|||
4096000, 7962624 |
|||
Writing inode tables: done |
|||
Creating journal (32768 blocks): done |
|||
Writing superblocks and filesystem accounting information: done |
|||
This filesystem will be automatically checked every 20 mounts or |
|||
180 days, whichever comes first. Use tune2fs -c or -i to override. |
|||
= Install kernel 3.4.4 = |
= Install kernel 3.4.4 = |
||
Revision as of 13:26, 4 July 2012
STUB - WORK IN PROGRESS
Hardware Configuration
- VGA: Nvidia GeForce 9800 GT
- CPU: Intel Core i7 3770
- Motherboard: DQ77MK
Used Software
- Dom0 OS: Funtoo GNU/Linux distro (derrived from gentoo).
- Kernel: 3.4.4
- Xen: 4.2.0-unstable rev 25099
- DomU OS: Windows XP SP3
Reference documentation
- Creating bootable USB-stick from gentoo livecd: http://www.gentoo.org/doc/en/liveusb.xml
- Funtoo installation: http://www.funtoo.org/wiki/Funtoo_Linux_Installation
- Xen 4.1 installation on gentoo: http://en.gentoo-wiki.com/wiki/Xen4.1
- Xen 4.2 installation on ubuntu: http://www.davidgis.fr/blog/index.php?2011/12/07/860-xen-%2042unstable-patches-for-vga-pass-through
- LVM installation guide on funtoo: http://www.funtoo.org/wiki/Rootfs_over_encrypted_lvm
Make bootable USB
Make partitions
# fdisk -l /dev/sdb
Disk /dev/sdb: 8422 MB, 8422162432 bytes
239 heads, 47 sectors/track, 1464 cylinders, total 16449536 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008aec7
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 16449535 8223744 b W95 FAT32
Install MBR
# dd if=/usr/share/syslinux/mbr.bin of=/dev/sdb 0+1 records in 0+1 records out 440 bytes (440 B) copied, 0.0190098 s, 23.1 kB/s
Make fat32 filesystem
# mkdosfs -F32 /dev/sdb1 mkdosfs 3.0.9 (31 Jan 2010)
Download Gentoo LiveCD iso
Go to http://www.gentoo.org/main/en/where.xml ; pick mirror you like and download install-amd64-minimal-[0-9]*.iso, for example - this one:
wget http://distfiles.gentoo.org/releases/amd64/autobuilds/current-iso/install-amd64-minimal-20120621.iso
Mount gentoo LiveCD
# mkdir -p /mnt/cdrom/ # mount -o loop install-amd64-minimal-20120621.iso /mnt/cdrom/ mount: warning: /mnt/cdrom/ seems to be mounted read-only.
Mount usb stick
# mkdir -p /mnt/usb/ # mount /dev/sdb1 /mnt/usb/
Copy contents of LiveCD to usb stick
# cp -aR /mnt/cdrom/* /mnt/usb/
# mv /mnt/usb/isolinux/* /mnt/usb
# mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg
# rm -rf /mnt/usb/isolinux*
# mv /mnt/usb/memtest86 /mnt/usb/memtest
# sed -i \
-e "s:cdroot:cdroot slowusb:" \
-e "s:kernel memtest86:kernel memtest:" \
/mnt/usb/syslinux.cfg
Unmount medias
# umount /mnt/cdrom/ # umount /mnt/usb/
Install syslinux
note guide # syslinux /dev/sdb1
Boot from USB-stick
If in trouble, try following gentoo handbook
Install Funtoo
Once booted, do this:
Partition hard drive
# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DDF92951-E1C2-4138-B01C-71051D08D1FB
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 67583 32.0 MiB EF02 BIOS boot partition
2 67584 1091583 500.0 MiB 8300 Linux filesystem
3 1091584 17868799 8.0 GiB 8200 Linux swap
4 17868800 1953525134 923.0 GiB 8E00 Linux LVM
Setup LVM
# pvcreate /dev/sda4
Writing physical volume data to disk "/dev/sda4"
Physical volume "/dev/sda4" successfully created
# vgcreate data /dev/sda4
Volume group "data" successfully created
# lvcreate -L40G -n root data
Logical volume "root" created
# lvcreate -L40G -n winxp data
Logical volume "winxp" created
Setup Filesystems
# mkfs.ext3 /dev/sda2
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=4 blocks, Stripe width=4 blocks
128016 inodes, 512000 blocks
25600 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
63 block groups
8192 blocks per group, 8192 fragments per group
2032 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mkswap /dev/sda3 Setting up swapspace version 1, size = 8388604 KiB no label, UUID=57c33913-7b18-4696-aa9c-048176161866
# mkfs.ext4 /dev/data/root
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=1 blocks
2621440 inodes, 10485760 blocks
524288 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
320 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Install kernel 3.4.4
# emerge -av =sys-kernels/gentoo-sources-3.4.4
- install xen 4.2-unsable
- install winxp
- integreate
