DragonOS/tools/create_hdd_image.sh
DaJiYuQia 27a97abd24
Patch procf (#90)
* 1234

* 123

* 合并master

* procfs

* 1

* procfs展示进程基本信息

* modified code

* 恢复权限

* 恢复权限

 #恢复权限

* modify permission

* 删除run.sh

* 解决第一次编译时磁盘镜像权限错误的问题

* 恢复.vscode/c_cpp_properties.json

* 删除process.c中错误的do_fork

* remake procfs

* 修改一些变量名

* 修改类型

* modified

* data_puts缓冲区溢出后return

Co-authored-by: longjin <longjin@RinGoTek.cn>
2022-11-26 17:34:00 +08:00

27 lines
510 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

echo "Creating virtual disk image..."
# 创建一至少为32MB磁盘镜像类型选择raw
qemu-img create -f raw disk.img 32M
# 使用fdisk把disk.img的分区表设置为MBR格式(下方的空行请勿删除)
fdisk disk.img << EOF
o
n
w
EOF
LOOP_DEVICE=$(sudo losetup -f --show -P disk.img) \
|| exit 1
echo ${LOOP_DEVICE}p1
sudo mkfs.vfat -F 32 ${LOOP_DEVICE}p1
sudo losetup -d ${LOOP_DEVICE}
echo "Successfully created disk image."
mkdir -p ../bin
chmod 777 disk.img
mv ./disk.img ../bin/