How-to-Make-a-Computer-Operating-System
How-to-Make-a-Computer-Operating-System copied to clipboard
Chapter 2: "make run" fails
make run fails at chapter 2.
make all completed successfully and when I run make run it fails with the following message:
: command not founde 35: : No such file or directorydev/loop1 make: *** [run] Error 1
Could you help?
Can you post the makefile you used? It sounds like you should replace dev/loop1 with /dev/loop1
I'm running Windows 8.1 and below are the Makefile and sdk/diskimage.sh. Thanks.
This is the Makefile:
SDKDIR=./sdk
help: @echo "Makefile for Building Dev Operating System." @echo "Usage: make [ all | clean | help | build | run] " @echo "" @echo
all: @echo "Building Kernel" make -C ./kernel @echo "Building SDK" make -C ./sdk @echo "Building Userland" make -C ./userland
build: zip -r devos-$(VERSION).zip ./
run: @echo "Running Dev Operating System." cd ./sdk && sudo bash ./diskimage.sh cd ./sdk && ./qemu.sh
clean: make -C ./kernel clean make -C ./userland clean
This is sdk/diskimage.sh where I believe it fails:
#!/bin/bash
qemu-img create c.img 2M
fdisk ./c.img << EOF
x
c
4
h
16
s
63
r
n
p
1
1
4
a
1
w
EOF
fdisk -l -u ./c.img
losetup -o 32256 /dev/loop1 ./c.img
mke2fs /dev/loop1
"diskimage.sh" 36 lines, 404 chars
I get the same errors on my Windows 10 with Oracle VM Virtualbox. :-/
your development environment must install in the wrong address,try recovery, and install in the root address
@uestclixiang @SamyPesse How can I do that correctly?
@SamyPesse same problem on my Windows machine as well. Is there any resolution to this?
I'm having the same issue. At least in Ubuntu 20.04, several /dev/loop?? devices are being used for system snapshots. You have to run {losetup} to figure out which loop device is open (on mine, it's loop13) and then probably run it with sudo. Most of the other commands also require root privileges.
Right now, mine is stuck on the grub command because there are several types/versions on Ubuntu.