From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 22 Nov 2009 17:32:30 -1000 From: Tim Newsham To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: <5a38f32b3b16f9577d031d0caff86c72@plan9.bell-labs.com> Message-ID: References: <5a38f32b3b16f9577d031d0caff86c72@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1465796871-706560659-1258947150=:13404" Subject: Re: [9fans] usb disks in plan9 Topicbox-Message-UUID: 9e487106-ead5-11e9-9d60-3106f5b1d025 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1465796871-706560659-1258947150=:13404 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > I'm talking to nemo about what we should do to partition USB devices. fwiw, I'm using the attached patch to /sys/src/9/pc/boot to mount my usb drive as root partition, now. The rootspec I'm using is "local!/dev/sdXX/fossil". It relies on adding yet more binaries to the ramdisk: partfs, fdisk and prep. It calls partfs to get a partitionable device, then runs fdisk and prep to read the existing partitions and write them back, forcing partfs to see them. Finally I had to patch the "local" connect method to not replace the existing /dev, since thats where /dev/sdXX appears. oh yah, my simple hack just guesses two possible locations for the USB disk to appear... Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com --1465796871-706560659-1258947150=:13404 Content-Type: APPLICATION/x-patch; name=boot-usb.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=boot-usb.patch YmluYXJ5IGZpbGVzIGJvb3QvbGliYm9vdC5hOCBib290cGF0Y2gvbGliYm9v dC5hOCBkaWZmZXIKZGlmZiAtYyBib290L2Jvb3QuYyBib290cGF0Y2gvYm9v dC5jCmJvb3QvYm9vdC5jOjMwNiwzMTMgLSBib290cGF0Y2gvYm9vdC5jOjMw NiwzMTgKICAJc3RhdGljIGNoYXIgdXNiZFtdID0gIi9ib290L3VzYmQiOwog IAogIAlpZihhY2Nlc3MoIiN1L3VzYi9jd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