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

image_partition: failed to mount the partition if more than one mountpoint has been specified. #532

Open
akaybayram61 opened this issue Jan 29, 2025 · 3 comments

Comments

@akaybayram61
Copy link

Output:

2025/01/29 05:38:42 ==== image-partition ====
2025/01/29 05:38:42 Formatting partition 1 | mkfs.fat: Warning: lowercase labels might not work properly on some systems
2025/01/29 05:38:42 Formatting partition 1 | mkfs.fat 4.2 (2021-01-31)
2025/01/29 05:38:42 Formatting partition 2 | mke2fs 1.46.5 (30-Dec-2021)
2025/01/29 05:38:42 Formatting partition 2 | Discarding device blocks: done
2025/01/29 05:38:42 Formatting partition 2 | Creating filesystem with 960937 4k blocks and 240480 inodes
2025/01/29 05:38:42 Formatting partition 2 | Filesystem UUID: a03ce6b2-3b7e-4681-b8e1-dda9f8bdbad4
2025/01/29 05:38:42 Formatting partition 2 | Superblock backups stored on blocks:
2025/01/29 05:38:42 Formatting partition 2 | 32768, 98304, 163840, 229376, 294912, 819200, 884736
2025/01/29 05:38:42 Formatting partition 2 |
2025/01/29 05:38:42 Formatting partition 2 | Allocating group tables: done
2025/01/29 05:38:42 Formatting partition 2 | Writing inode tables: done
2025/01/29 05:38:42 Formatting partition 2 | Creating journal (16384 blocks): done
2025/01/29 05:38:42 Formatting partition 2 | Writing superblocks and filesystem accounting information: done
2025/01/29 05:38:42 Formatting partition 2 |
2025/01/29 05:38:42 Action image-partition failed at stage Run, error: boot mount failed: no such device
2025/01/29 05:38:42 Warning: Failed to get unmount /boot: invalid argument
2025/01/29 05:38:42 Unmount failure can cause images being incomplete!

My config:

{{- $image := or .image "test.tgz" -}}
{{- $adminusername := or .adminusername "admin" -}}

architecture: arm64

actions:
  - action: debootstrap
    suite: bookworm
    components:
      - main
    variant: minbase

  - action: apt
    packages: [
	tar,sudo,systemd-sysv,iproute2,vim
    ]

  - action: run
    description: add hostname
    chroot: true
    command: echo "debhost" > /etc/hostname

  - action: image-partition
    imagename: test.img
    imagesize: 4G
    partitiontype: msdos
    mountpoints: 
      - mountpoint: /
        partition: root
      - mountpoint: /boot
        partition: boot
        options: [ x-systemd.automount ]
    partitions:
      - name: boot
        fs: fat32
        start: 0%
        end: 64MB
      - name: root
        fs: ext4
        start: 64MB
        end: 100%
        flags: [ boot ]

  - action: filesystem-deploy
    description: Deploying filesystem onto image

  - action: pack
    file: {{ $image }}
    compression: gz

The command I used:

sudo /opt/src/gocode/bin/debos test.yaml

I also tried it with Docker:

docker run --rm --interactive --tty --device /dev/kvm --user $(id -u) --workdir /recipes --mount "type=bind,source=$(pwd),destination=/recipes" --security-opt label=disable --group-add "$(stat -c '%g' /dev/kvm)" godebos/debos test.yaml

I installed version 1.1.3, but the issue did not occur in that version. Then, when I tested with the main branch, the issue also did not occur. It seems that the problem exists only in version 1.1.4.

The system specifications are as follows:

OS: Ubuntu 22.04.5 LTS x86_64 
Host: 11D9S11Q00 ThinkCentre M70t 
Kernel: 6.8.0-51-generic
go version go1.23.5 linux/amd64
Packages: 1799 (dpkg), 52 (nix-user), 12 (snap) 
Shell: bash 5.1.16 
DE: GNOME 42.9 
WM: Mutter 
WM Theme: Adwaita 
Terminal: gnome-terminal 
CPU: Intel i7-10700 (16) @ 4.800GHz 
GPU: Intel CometLake-S GT2 [UHD Graphics 630] 
Memory: 2618MiB / 23774MiB 
@obbardc
Copy link
Member

obbardc commented Jan 29, 2025

Can you try again with the main branch ? e.g go install -v github.com/go-debos/debos/cmd/debos@main

@akaybayram61
Copy link
Author

When I installed and ran it with the command you sent, 'go install -v github.com/go-debos/debos/cmd/debos@main', it completed successfully without any issues.

@obbardc
Copy link
Member

obbardc commented Jan 29, 2025

When I installed and ran it with the command you sent, 'go install -v github.com/go-debos/debos/cmd/debos@main', it completed successfully without any issues.

Great, sounds like tagging a new release will help you then :-)

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

2 participants