forked from Bananymous/banan-os
Build System: Create base directory for the FS
This commit is contained in:
parent
f8a2c60c8d
commit
3dab392296
15
disk.sh
15
disk.sh
|
@ -2,6 +2,8 @@
|
||||||
set -e
|
set -e
|
||||||
. ./build.sh
|
. ./build.sh
|
||||||
|
|
||||||
|
cp -r base/* $SYSROOT
|
||||||
|
|
||||||
DISK_NAME=banan-os.img
|
DISK_NAME=banan-os.img
|
||||||
DISK_SIZE=$[50 * 1024 * 1024]
|
DISK_SIZE=$[50 * 1024 * 1024]
|
||||||
MOUNT_DIR=/mnt
|
MOUNT_DIR=/mnt
|
||||||
|
@ -46,14 +48,16 @@ PARTITION1=${LOOP_DEV}p1
|
||||||
PARTITION2=${LOOP_DEV}p2
|
PARTITION2=${LOOP_DEV}p2
|
||||||
PARTITION3=${LOOP_DEV}p3
|
PARTITION3=${LOOP_DEV}p3
|
||||||
|
|
||||||
|
sudo mkfs.ext2 $PARTITION3
|
||||||
|
sudo mount $PARTITION3 $MOUNT_DIR
|
||||||
|
echo 'hello' | sudo tee ${MOUNT_DIR}/hello.txt
|
||||||
|
sudo umount $MOUNT_DIR
|
||||||
|
|
||||||
sudo mkfs.ext2 $PARTITION2
|
sudo mkfs.ext2 $PARTITION2
|
||||||
|
|
||||||
sudo mount $PARTITION2 $MOUNT_DIR
|
sudo mount $PARTITION2 $MOUNT_DIR
|
||||||
|
|
||||||
sudo cp -r ${SYSROOT}/* ${MOUNT_DIR}/
|
sudo cp -r ${SYSROOT}/* ${MOUNT_DIR}/
|
||||||
sudo mkdir -p ${MOUNT_DIR}/usr/share/
|
|
||||||
sudo cp -r fonts ${MOUNT_DIR}/usr/share/
|
|
||||||
sudo mkdir -p ${MOUNT_DIR}/mnt/
|
|
||||||
|
|
||||||
sudo grub-install --no-floppy --target=i386-pc --modules="normal ext2 multiboot" --boot-directory=${MOUNT_DIR}/boot $LOOP_DEV
|
sudo grub-install --no-floppy --target=i386-pc --modules="normal ext2 multiboot" --boot-directory=${MOUNT_DIR}/boot $LOOP_DEV
|
||||||
|
|
||||||
|
@ -74,9 +78,4 @@ menuentry "banan-os (no apic, no serial)" {
|
||||||
|
|
||||||
sudo umount $MOUNT_DIR
|
sudo umount $MOUNT_DIR
|
||||||
|
|
||||||
sudo mkfs.ext2 $PARTITION3
|
|
||||||
sudo mount $PARTITION3 $MOUNT_DIR
|
|
||||||
echo 'hello' | sudo tee ${MOUNT_DIR}/hello.txt
|
|
||||||
sudo umount $MOUNT_DIR
|
|
||||||
|
|
||||||
sudo losetup -d $LOOP_DEV
|
sudo losetup -d $LOOP_DEV
|
||||||
|
|
Loading…
Reference in New Issue