malabar // install netbsd on ext2fs from gnu/linux

malabar-ext2fs | malabar-ext2fs-boot | xen guest-netbsd-ext2fs | kvm guest-netbsd-ext2fs

this guide has been implemented as a script

descr

no partition table required

fsck_ext2fs has been enhanced therefore this is now possible since netbsd-current Sun Mar 31 13:16:52 2019 UTC (revs 1.36 - 1.39)

requirements

grab NetBSD binary sets

virtual disk

    guest=nbext2fs

start clean

    losetup --list
    losetup --all
    losetup --detach /dev/loop0

    virsh list --all
    virsh destroy $guest

prepare the vdisk

    mkdir /root/guests/$guest/
    cd /root/guests/$guest/

    rm -f $guest.sparse
    dd if=/dev/zero of=$guest.sparse bs=1G count=0 seek=10
    # bs=1000k count=0 seek=4000

bootstrap

additional notes

supported ext2 features

let us test the features that NetBSD 8.99.36 implements

    newfs_ext2fs -I -O1 /dev/rxbd1d

then from the gnu/linux host

    file $guest.data.sparse
    tune2fs -l $guest.data.sparse
    dumpe2fs $guest.data.sparse > $guest.data.sparse.dumpe2fs.dist
    dumpe2fs $guest.data.sparse | grep ^Group | wc -l #31
    dumpe2fs $guest.data.sparse | grep 'Backup superblock' | wc -l #7

gives

    Linux rev 1.0 ext2 filesystem data, UUID=29a111d1-03f8-9048-9b95-30446b526f74 (large files)

    tune2fs 1.44.1 (24-Mar-2018)
    Filesystem volume name:   <none>
    Last mounted on:          <not available>
    Filesystem UUID:          29a111d1-03f8-9048-9b95-30446b526f74
    Filesystem magic number:  0xEF53
    Filesystem revision #:    1 (dynamic)
    Filesystem features:      resize_inode filetype sparse_super large_file
    Default mount options:    (none)
    Filesystem state:         clean
    Errors behavior:          Continue
    Filesystem OS type:       Linux
    Inode count:              500960
    Block count:              1000000
    Reserved block count:     50000
    Free blocks:              982309
    Free inodes:              500949
    First block:              0
    Block size:               4096
    Fragment size:            4096
    Reserved GDT blocks:      244
    Blocks per group:         32768
    Fragments per group:      32768
    Inodes per group:         16160
    Inode blocks per group:   505
    Last mount time:          n/a
    Last write time:          Sat Mar 30 16:12:01 2019
    Mount count:              0
    Maximum mount count:      20
    Last checked:             Sat Mar 30 16:12:01 2019
    Check interval:           15552000 (6 months)
    Next check after:         Thu Sep 26 16:12:01 2019
    Reserved blocks uid:      0 (user root)
    Reserved blocks gid:      0 (group root)
    First inode:              11
    Inode size:               128

HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun