Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues BIOS32 #8

Open
rvanlaar opened this issue Sep 30, 2019 · 2 comments
Open

Build issues BIOS32 #8

rvanlaar opened this issue Sep 30, 2019 · 2 comments

Comments

@rvanlaar
Copy link
Contributor

What's going on?
I'm running run.me.sh on ubuntu 18.04 in a linux container.

I do get an unknown command error with fdisk:

  • fdisk BIOS32-1.15.1-90-g01c549d-dirty.img

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xa9cdb103.

Command (m for help): Created a new DOS disklabel with disk identifier 0xc62bc52a.

Command (m for help): Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (2048-112639, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-112639, default 112639):
Created a new partition 1 of type 'Linux' and of size 54 MiB.

Command (m for help):

Command (m for help):
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): 1: unknown command

Command (m for help):
The partition table has been altered.
Syncing disks.

  • dd if=../scratch/syslinux-6.03/bios/mbr/mbr.bin of=BIOS32-1.15.1-90-g01c549d-dirty.img count=1 conv=notrunc bs=512
    0+1 records in
    0+1 records out
    440 bytes copied, 0,000614672 s, 716 kB/s
    ++ sudo losetup --show -f -o 1048576 BIOS32-1.15.1-90-g01c549d-dirty.img
    losetup: cannot find an unused loop device
  • LOOPDEV=
  • sudo mkfs.ext4 -L BIOS32
    Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size]
    [-i bytes-per-inode] [-I inode-size] [-J journal-options]
    [-G flex-group-size] [-N number-of-inodes] [-d root-directory]
    [-m reserved-blocks-percentage] [-o creator-os]
    [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
    [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
    [-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]
    [-jnqvDFSV] device [blocks-count]
  • mkdir image
  • sudo mount image
    mount: image: can't find in /etc/fstab.
  • sudo chmod 777 image
  • sudo mkdir -p image/boot/extlinux
  • sudo ../scratch/syslinux-6.03/bios/extlinux/extlinux --install image/boot/extlinux
    sudo: unable to execute ../scratch/syslinux-6.03/bios/extlinux/extlinux: No such file or directory
  • sudo cp ../scratch/buildroot/32bit/images/bzImage image/boot/extlinux/
  • sudo cp ../scratch/buildroot/32bit/images/rootfs.cpio.xz image/boot/extlinux/
  • sudo cp ../buildroot/syslinux.cfg image/boot/extlinux/extlinux.conf
  • sudo umount image
    umount: image: not mounted.
  • sudo losetup -d
    losetup: option requires an argument -- 'd'
    Try 'losetup --help' for more information.
  • gzip BIOS32-1.15.1-90-g01c549d-dirty.img
    ./buildUEFI64: 89: ./buildUEFI64: sgdisk: not found

All done.
Making noise so you know we're done.

@rvanlaar
Copy link
Contributor Author

rvanlaar commented Sep 30, 2019

The '1: unknown command' error has to do with this line:

(echo o;echo n;echo p;echo 1;echo "";echo "";echo "";echo a;echo 1;echo w) | fdisk ${BUILDIMG}

It's the last '1' that is an unrecognized command

@rvanlaar
Copy link
Contributor Author

It seems that linux container don't have support for loop devices by default.
This issue can be closed, except for the '1' problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant