aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--create-image.sh6
-rw-r--r--create-initrd.sh9
-rw-r--r--files/boot/grub.cfg2
-rw-r--r--files/boot/grub.initrd.cfg2
5 files changed, 19 insertions, 7 deletions
diff --git a/README.md b/README.md
index 34cb9e9..a53ea13 100644
--- a/README.md
+++ b/README.md
@@ -25,3 +25,10 @@ Once the toolchain is in place, run "bash compile.sh" to build a very basic set
If everything went alright, then run "bash create-image.sh" to create a bootable disk image. You will be asked for a sudo password because you need access to the loopback device. The script will use the base system built previously. The script runs 'grub-install' on the final disk image and needs to have the files for the i386-pc architecture (in debian, you need to install grub-pc-bin).
Once the file "hd.img" is in place, just run it on your favorite virtual machine. The grub bootloader will load GNU Mach and the Hurd and complete the installation process by populating the /dev directory and then rebooting. Afterwards, just enter "login root" to log into the system.
+
+# Qemu specific parameters
+In files/boot/grub.cfg, device type defined as "noide". Therefore, in qemu you need to add machine type Standard PC (Q35 + ICH9, 2009) by appending "-M q35".
+
+example: $ qemu-system-i386 2G -drive cache=writeback,file=hd.img -M q35
+
+But in case of image created with "create-initrd.sh", you don't need to append "-M q35".
diff --git a/create-image.sh b/create-image.sh
index 1ae60cc..290c0d3 100644
--- a/create-image.sh
+++ b/create-image.sh
@@ -5,7 +5,7 @@
LOOP=$(sudo losetup -f)
LOOPPART="${LOOP}p1"
IMG=hd.img
-IMG_SIZE=10GB
+IMG_SIZE=4GB
BASE_SYS_ROOT=$(basename $SYS_ROOT)
create_image () {
@@ -53,9 +53,9 @@ copy_files () {
cp -R $SYSTEM/$BASE_SYS_ROOT/libexec/* mount/libexec/ &&
cp files/{rc,runsystem} mount/libexec/ &&
(if [ -f mount/lib/ld-x86-64.so.1 ]; then
- ln -sfv /lib/ld-x86-64.so.1 mount/lib/ld.so
+ ln -svf /lib/ld-x86-64.so.1 mount/lib/ld.so
else
- ln -sfv /lib/ld.so.1 mount/lib/ld.so
+ ln -svf /lib/ld.so.1 mount/lib/ld.so
fi) &&
ln -svf / mount/$BASE_SYS_ROOT
ln -svf /bin/bash mount/bin/sh &&
diff --git a/create-initrd.sh b/create-initrd.sh
index 40bc2a9..b39d27e 100644
--- a/create-initrd.sh
+++ b/create-initrd.sh
@@ -12,7 +12,7 @@ LOOPPART="${LOOP}p1"
IMG_SIZE=2048MB
BASE_SYS_ROOT=$(basename $SYS_ROOT)
INITRD_FILE=initrd.ext2
-INITRD_SIZE=100MB
+INITRD_SIZE=250MB
DISK_SIZE=2048MB
IMG=hd.img
@@ -76,7 +76,12 @@ fill_disk () {
mkdir -p output-disk/{sbin,boot,tools,lib} &&
mkdir -p output-disk/boot/grub &&
cp $src/hurd/ext2fs.static output-disk/sbin &&
- cp $src/lib/ld-x86-64.so.1 output-disk/lib/ld.so.1 &&
+ (if [ -f mount/lib/ld-x86-64.so.1 ]; then
+ cp $src/lib/ld-x86-64.so.1 output-disk/lib/ld.so.1
+ else
+ cp $src/lib/ld.so.1 output-disk/lib/ld.so.1
+ fi) &&
+ ln -sfv /lib/ld.so.1 output-disk/lib/ld.so &&
mv $INITRD_FILE output-disk/boot &&
cp $SYSTEM/boot/gnumach output-disk/boot &&
cp files/boot/grub.initrd.cfg output-disk/boot/grub/grub.cfg &&
diff --git a/files/boot/grub.cfg b/files/boot/grub.cfg
index 25db24f..fea01f6 100644
--- a/files/boot/grub.cfg
+++ b/files/boot/grub.cfg
@@ -8,7 +8,7 @@ set timeout=1
menuentry 'GNU' {
set root='hd0,msdos1'
echo 'Loading GNU Mach'
- multiboot /boot/gnumach.gz root=part:1:device:wd0 noide
+ multiboot /boot/gnumach.gz root=part:1:device:wd0 noide console=com0
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
diff --git a/files/boot/grub.initrd.cfg b/files/boot/grub.initrd.cfg
index 41325bf..af7fa04 100644
--- a/files/boot/grub.initrd.cfg
+++ b/files/boot/grub.initrd.cfg
@@ -14,6 +14,6 @@ menuentry 'Hurd' {
echo 'Loading ext2fs.static'
module /sbin/ext2fs.static ext2fs --multiboot-command-line='${kernel-command-line}' --readonly --host-priv-port='${host-port}' --device-master-port='${device-port}' --exec-server-task='${exec-task}' --kernel-task='${kernel-task}' -T device rd0 '$(fs-task=task-create)' '$(prompt-task-resume)'
echo 'Loading exec'
- module /lib/ld.so.1 ld.so.1 /hurd/exec --device-master-port='${device-port}' '$(exec-task=task-create)'
+ module /lib/ld.so exec /hurd/exec --device-master-port='${device-port}' '$(exec-task=task-create)'
boot
}