[9fans] Mount a usb ext2 hd? - Plan9

This is a discussion on [9fans] Mount a usb ext2 hd? - Plan9 ; Any clues or tips? I've tried: % usb/disk -l usb/disk: statusread: usb endpoint stalled % cat /n/disk/ctl 0: inquiry SAMSUNG HD320KJ geometry 625142448 512 % disk/fdisk -p /n/disk/0/data part linux 63 625137345 % ext2srv -f /n/disk/0/data:63 ext2 % ls /srv/ext2 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: [9fans] Mount a usb ext2 hd?

  1. [9fans] Mount a usb ext2 hd?

    Any clues or tips? I've tried:

    % usb/disk -l
    usb/disk: statusread: usb endpoint stalled

    % cat /n/disk/ctl
    0: inquiry SAMSUNG HD320KJ geometry 625142448 512

    % disk/fdisk -p /n/disk/0/data
    part linux 63 625137345

    % ext2srv -f /n/disk/0/data:63 ext2
    % ls /srv/ext2
    /srv/ext2

    % if(! test -e /n/usb) mkdir /n/usb
    % mount -c /srv/ext2 /n/usb
    mount: mount /n/usb: file does not exist



    Regards,
    Markus



  2. Re: [9fans] Mount a usb ext2 hd?

    > % usb/disk -l
    > usb/disk: statusread: usb endpoint stalled
    >
    > % cat /n/disk/ctl
    > 0: inquiry SAMSUNG HD320KJ geometry 625142448 512
    >
    > % disk/fdisk -p /n/disk/0/data
    > part linux 63 625137345


    you need to use partfs to partition /n/disk.
    this will give you /dev/sdXX by default.

    disk/partfs /n/disk/0/data
    disk/fdisk -p /dev/sdXX/data>/dev/sdXX/ctl
    if(test -f /dev/sdXX/plan9)
    disk/prep -p /dev/sdXX/plan9>/dev/sdXX/ctl

    >
    > % ext2srv -f /n/disk/0/data:63 ext2
    > % ls /srv/ext2
    > /srv/ext2


    you would then have
    ext2srv -f /dev/sdXX/$partition

    > % if(! test -e /n/usb) mkdir /n/usb
    > % mount -c /srv/ext2 /n/usb
    > mount: mount /n/usb: file does not exist


    i think you mean

    mount -c /srv/ext2 /n/ext2 /dev/sdXX/$partition

    - erik



  3. Re: [9fans] Mount a usb ext2 hd?

    >> % if(! test -e /n/usb) mkdir /n/usb
    >> % mount -c /srv/ext2 /n/usb
    >> mount: mount /n/usb: file does not exist

    >
    > i think you mean
    >
    > mount -c /srv/ext2 /n/ext2 /dev/sdXX/$partition


    are you correcting the /n/usb to /n/ext2, or the lack of a
    spec arg? if the later, at least as per the man page, both
    work. without the spec arg, ext2srv uses the -f arg as a
    default (as does dossrv, which was news to me). if the
    former, i agree it's clearer but it shouldn't break things,
    no?



  4. Re: [9fans] Mount a usb ext2 hd?

    Thank you! I works like this:

    usb/disk
    disk/partfs -m /dev -d sdU0 /n/disk/0/data
    disk/fdisk -p /dev/sdU0/data>/dev/sdU0/ctl
    blk=`{disk/fdisk -p $disk | awk '/^part linux / {print $3}'}
    ext2srv -f /n/disk/0/data:$blk usbdisk
    mount -c /srv/usbdisk /n/usb /dev/sdU0/linux



  5. Re: [9fans] Mount a usb ext2 hd?

    you can omit the -f ... arg on ext2srv if you specify the partition
    anyway on mountspec.


+ Reply to Thread