autoinst.sh for GPT

2015-10-04 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I've prepared a script to automatically install NetBSD on a GPT disk.
It's tuned to work in an environment with constrain set of utilities,
optimized for boot.iso and boot-com.iso.

ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/autoinst.sh

Q: What does it do?
1. Partitioning GPT (ROOT + SWAP).
2. Fetching sets and unpacking to new disk.
3. Introductory setuping fstab, root password, bootloader, rc.conf
(sshd, dhcpcd, hostname).

Q: Is there a usage() string?
Yes, here you are:
autoinst.sh [-s swap-size-mb] [-S swap-size-blocks] [-r root-password]
[-c console-type] [-C console-speed] [-h host-name] [-p] device-name

Where:
- -s|-S set swap size in megabytes, the rest will be used for root (ffsv2)
- -r set root password from command line (insecure, this is just to
deploy a machine without empty password)
- -c|-C options to tune for serial usage, e.g. inside qemu -nographic
- -h your desired hostname (default: netbsd)
- -p optionally fetch the stable source release of pkgsrc
device-name stands for hardware device name, eg. wd0 or ld0 (virtio)

Q: How to use it to deploy a new installation inside KVM?
1. Create qemu disk
qemu-img create -f qcow2 netbsd7.0_amd64 10G

2. Run installer
qemu-system-x86_64 \
-enable-kvm \
-net nic,model=virtio -net user \
-m 2G \
-cdrom boot-com.iso \
-nographic \
-smp cores=2 \
-drive file= netbsd7.0_amd64,media=disk,if=virtio \
-boot d

3. Fetch and run autoinst.sh
Exit to shell from the installer (sysinst), type ctrl-c, and next:
cd /tmp (enter writable directory)
ftp ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/autoinst.sh
chmod +x autoinst.sh
./autoinst.sh -s 128 -r mypass -c com0 -C 9600 ld0
(take a coffee break)
If everything went OK, just type:
poweroff

4. Run inside your newly installed system
qemu-system-x86_64 \
-enable-kvm \
-net nic,model=virtio -net user \
-m 2G \
-nographic \
-smp cores=2 \
-drive file=netbsd7.0_amd64,media=disk,if=virtio \
-boot c

Q: Why to bother with sshd and serial?
Because it was designed for two types of environments:
1. A setup without vga/console output, after the system installation.
Every fail will result with an automatic intervention and need to
boostrap installer from scratch.
2. A setup for just console interface through qemu. It's fairy more
suitable for me than vnc.

Q: Where does it come from?
It's a fork of autoinst.sh by asau@ from
ftp://ftp.netbsd.org/pub/NetBSD/misc/asau/autoinst.sh tuned for my
needs. It's rumored to be a descendant of a fossil of real world
deployment script.

Q: Credit? License?
Most credit should go to the author of the original autoinst.sh (asau@).

Please treat my changes to the original version, as a BSD/MIT licensed
work - use it entirely at your own risk.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWEe4/AAoJEEuzCOmwLnZsvbMP/1m2xK+MQB0d4Jp4yH53s0uL
VlSqmi++4PUZsyEUWRgKnTpSqDM/Jvum2DHseqzvT9txC2wOVLSkgP4pDa5V7pLz
vSTiSnIBcU3O4RJ17SgfGQNR9E2n9fVoCSc/BpnZ4b+3vlWMt8Zw5yRu/rAHTQmO
n2FCFy3Ut+KQf+Zkb8gZNbHbflB9KUVmw2uq8z+OutGdnkAcHyTiVHyhCUnc8ZBj
6GB4knYacxET6MtRnYxDIJ/+2S7ev5bUGCLLCrf7rTIbtnmySsh63WsLylUIjoqu
vgVVjaXpdKkOq5WDU0leLB1skksQhhM7EZzydiUrVl8uzouL/GN4R5R9I3t0/AuU
lEhZ78EtYlt8st8V+eGnB5FFuRW7Yhskc5vekJPvlSoEbCJrcLrkJ9cofaT1ptF3
3gniLW2hVb1ZOx7BUrmc6X0moW07DwmNo0RtqzoDdb3fLr2DtmLgfz4ixNxT0b+B
9DnfrW4ICnbmg0ILqWg/kPLo+B8qEjiGAyhV9MNd729DhSWPWD9CdFAYV9Ml92U+
To4V5d0Ip6H9wI5I3/XoqbQiCNyuWXGxkc2fuIhPw8cFwDd0uzdKdp5XqlIpn/Xa
XUq6shKyQ8HOQy2G3W4OzvqLkQubGzuhjiKeRIclbOVlEnK7KKrkqfdjmRXB/Uxz
ue9xHGs2jh+/oF99Yg9j
=76yM
-END PGP SIGNATURE-


How to query HDD status

2015-10-04 Thread William A. Mahaffey III



When I try to use atactl to query the status of the microSD 'HDD" on my 
RPiB+, I get the following:



rpi # atactl ld0 identify
atactl: ATAIOCCOMMAND failed: Inappropriate ioctl for device
rpi # uname -a
NetBSD rpi 7.0_BETA NetBSD 7.0_BETA (RPI.201503272230Z) evbarm
rpi #


What is the appropriate command for querying microSD status under NetBSD 
7-ish on my RPiB+ ? TIA & have a nice weekend.


--

William A. Mahaffey III

 --

"The M1 Garand is without doubt the finest implement of war
 ever devised by man."
   -- Gen. George S. Patton Jr.



Re: pkgsrc-2015Q3 released

2015-10-04 Thread Rhialto
On Wed 30 Sep 2015 at 10:29:16 -0400, Greg Troxel wrote:
> Basically yes.  Howver, you may want to do a final update of the tree
> From sourceforge and verify you have no uncommitted changes that you
> want to keep.  (If so, you will have to manage them manually.)

which currently gives errors about "cannot close CVS/Entries" and
"No space left on device"... precisely the sort of reasons we moved away
from there of course.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl-- 'this bath is too hot.'


pgpYqai8Aq8o3.pgp
Description: PGP signature


Re: If NetBSD can run Linux binaries, can it run Android apps?

2015-10-04 Thread Ottavio Caruso
On 1 October 2015 at 10:26, Julian H. Stacey  wrote:
> Hi, Reference:
>> From: John Nemeth 
>> Date: Wed, 30 Sep 2015 18:04:55 -0700
>
> John Nemeth wrote:
>> On Sep 30, 11:04pm, Ottavio Caruso wrote:
>> } Subject: If NetBSD can run Linux binaries, can it run Android apps?
>>
>>  Not likely.
>>
>> } And if not, why not?
>>
>>  Android consists of a heck of a lot more then just a Linux kernel.
>>
>> }-- End of excerpt from Ottavio Caruso
>
> I was considering the same question today, but for FreeBSD,
> as I might need to try to extend support to a newer Adobe Acrobat, perhaps
> from Android. (My reason: http://berklix.com/~jhs/txt/ct600.html )
> I hope to avoid it though, Acrobat is loathsome.
>
> But it would be nice if the BSDs had ABI support for Android, is
> there a central mail list/ web page/ person that focuses
> discussion on that or a list of URLs ?
>
> Cheers,
> Julian
> --
> Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich http://berklix.com
>  Reply after previous text, like a play - Not before, which loses context.
>  Indent previous text with "> " Insert new lines before 80 chars.
>  Send plain text, Not quoted-printable, Not HTML, Not ms.doc, Not base64.
>  
> http://space.stackexchange.com/questions/12135/is-water-on-mars-the-same-as-ea
> rth-water

I've heard unverified stories of people running Android-x86 in a
chroot under ChromeOS on a Chromebook.

If the above is true and if ChromeOS is indeed Linux, would it be
possible to install a Linux subset under /emul/linux and then chroot
into it?

Potentially this would be two chroots, one into /emul/linux, the other
under /emul/linux/android ?

Consider that it is possible to run a complete Debian subset under
Android. Why can't the opposite be true?

-- 
Ottavio