-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHOWTO
119 lines (90 loc) · 4.17 KB
/
HOWTO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
================================================================================
Build process
================================================================================
make kernelconfig
-> and configure kernel for example with kernelconfig.example options
make kernel
At this point, microkernel is built
make bootstrap
make bootstrap-install
Now, you have built bootstrap code (multiboot info code and required
sigma0).
make freevms
All FreeVMS kernel parts are build. If you have a image disk mounted in
../mnt, you can install all files with:
make image
================================================================================
Build image
================================================================================
FreeVMS requires a partitionned disk image and a modified grub that
handle ODS2, EXT2 and multiboot information. To build a disk image,
run the following instructions:
Initialize an empty disk image with dd (for example a 80 MB hard disk)
Root cauchy:[/home/bertrand/openvms] > qemu-img create -f raw image.img 80M
Formatting 'image.img', fmt=raw size=83886080
Root cauchy:[/home/bertrand/openvms] > sfdisk -D image.img << EOF
> ,,L,*
> ;
> ;
> ;
> EOF
Warning: image.img is not a block device
Disk image.img: cannot get geometry
Disk image.img: 10 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
image.img1 0 - 0 0 0 Empty
image.img2 0 - 0 0 0 Empty
image.img3 0 - 0 0 0 Empty
image.img4 0 - 0 0 0 Empty
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
image.img1 * 0+ 9 10- 80293+ 83 Linux
image.img2 0 - 0 0 0 Empty
image.img3 0 - 0 0 0 Empty
image.img4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Ioctl() inappropré pour un périphérique
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Root cauchy:[/home/bertrand/openvms] >
Now, we're going to mount this disk image.
Root cauchy:[/home/bertrand/openvms] > fdisk -l image.img
You must set cylinders.
You can do this from the extra functions menu.
Disk image.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x62e92de4
Device Boot Start End Blocks Id System
image.img1 * 1 10 80293+ 83 Linux
Root cauchy:[/home/bertrand/openvms] >
First partition begin at 1*63*512 (start cylinder * sector per track *
sector size).
Root cauchy:[/home/bertrand/openvms] > losetup -o $((63*512)) /dev/loop0 \
image.img
Root cauchy:[/home/bertrand/openvms] > mkfs.ext2 /dev/loop0
Root cauchy:[/home/bertrand/openvms] > mount /dev/loop0 mnt
Root cauchy:[/home/bertrand/openvms] > losetup /dev/loop1 image.img
Now, you only have to install grub2 on boot record. Grub2 is built
into build/bootloader.
Root riemann:[/home/bertrand/openvms/FreeVMS/build/bootloader/build/sbin] >
./grub-install --boot-directory=/home/bertrand/openvms/mnt --target i386-pc
--modules=part_msdos /dev/loop1
That's all, folks !
================================================================================
Qemu
================================================================================
Start qemu with:
qemu-system-x86_64 -hdc freevms.img -smp 1 -serial stdio -m 128M -k fr
================================================================================
VirtualBox
================================================================================
Makefile contains some rules to build a virtualbox image from qemu's one.
Check start-vb.