Describe how to create a NetBSD live flash drive
The NetBSD Project
Status: Closed
Time to complete: 240 hrs
Mentors: blymn, Julian Coleman, Julian Fagir
Flash drives become increasingly the source for operating system installations.
Though, you might want to try the operating system first by using a live system.
In this task you should create a live USB flash drive from NetBSD. You can use Jibbed or the installation USB flash drive images as an example how to do this.
In the end, there should be a howto which steps have to be taken to enable NetBSD to boot from a flash drive.
Uploaded Work
| File name/URL | File size | Date submitted | |
|---|---|---|---|
| NetBSD USB.pdf | 369.4 KB | December 04 2012 15:13 UTC | |
| Install guide.markdown | 21.6 KB | January 04 2013 13:08 UTC | |
| guide-v2.markdown | 21.8 KB | January 04 2013 13:13 UTC | |
| guide-v3.markdown | 31.3 KB | January 05 2013 12:49 UTC | |
| guide-v4.markdown | 31.5 KB | January 06 2013 01:58 UTC |
What do you mean by a enabling NetBSD to boot from a flash drive? Do you mean changing the BIOS for the boot device?
I would like to work on this task.
This task has been assigned to JAR. You have 240 hours to complete this task, good luck!
Hi,
a live system entails more than just changing the BIOS boot device. You have to do some tweaks on the operating system to actually be useful on the very slow flashdrives.
Regards, Julian
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to Lucian Jan Filimon. You have 240 hours to complete this task, good luck!
Hi!
You're working on this task for two days already.
Despite the published estimated time, it is not that hard (complexity is overestimated), and by now you should have almost functioning image at the very least.
It is possible that you got stuck or misdirected. Please, get in touch with us on #netbsd-code so that we discuss problems or help you wrap up.
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
Do I have to specifically use a OS(Win, Linux or OS X), to create the live USB?
You will need to use NetBSD to perform this task as there are tools you need to run to setup the flash drive to boot that are only available in NetBSD.
This task has been assigned to Alvin Tan. You have 240 hours to complete this task, good luck!
The claim on this task has been removed, someone else can claim it now.
I guess that'd be a potential problem? The NetBSD partitions could correspond to different /dev 'nodes' depending on circumstances, right?
I did get a usb drive to work with NetBSD for installing, but I had to mess around with it a lot...
Yes, that is a problem. The standard mounting mechanism won't work for USB devices.
Maybe it's a bit too much for this task, but in the end, you would have to provide a script which probes for the right device and mounts it.
If you created a USB stick from scratch for the installer, and it was essentially more than just what is already described in the USB stick howto, you could also claim this task and describe what you have done.
Hi,
I don't know the purpose of this task exactly. Could you please tell me what's the right one?
Than you.
The third option is the one we are after.
I would like to work on this task.
This task has been assigned to wmzhere. You have 240 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
Overall, this looks like an excellent job to me. I can only see a couple of very small nits:
1) You use the phrase "unmounting might cost some time", this is not correct English and should be fixed
2) In the clean up you say run the command "umount /dev/cdrom", that is not where you said to mount things!
Can you please tidy these things up?
Thanks for the efforts so far.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
The work on this task is ready to be reviewed.
Hi,
I'm sorry that I posted the file with an error. Here's the diff.
--- guide-v3.markdown2013-01-05 20:55:47.389849387 +0800
+++ guide-v3-fix.markdown2013-01-05 20:52:26.505844801 +0800
@@ -801,7 +801,7 @@
Insert the following text to `/mnt/usb/etc/rc.conf`. That will make NetBSD mount it at boot time.
-critical_filesystems_local = /var/run
+critical_filesystems_local="/var/run"
You can unmount the drive and try to boot from it now.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
Uhm, please apply that patch and upload the file again, it's difficult to apply the patch from Google Melange.
Are you sure using only /var/run as a tmpfs is sufficient? We've talked about that on IRC, I personally woudl also mount /var/tmp, /tmp and maybe even /var/lock as a tmpfs, but apparently you talked to blymn and he considered your work correct.
There's only one small thing I would also correct:
NetBSD# rm -rf /mnt/usb
is correct, but unnecessarily aggressive. Rather do `rmdir /mnt/usb` in case the user placed some files there (he shouldn't do that, but you never know).
Anyway, please upload again with your patch applied.
The work on this task is ready to be reviewed.
Hi Julian,
Thank you for your suggestions. Actually, "rm -rf" would be a catastrophe if user place something important there.
As for tmpfs for "/var/lock", I don't think it's necessary. The lock files are small and can be easily cached.
I think Julian is more concerned about wear and tear on the USB flash drive, they do have have a limited number of write cycles. Mind you, there are lots of other things that would need to be done to minimise the writes to the drive.
Personally, I don't think we need to go overboard on these things for the purpose of this exercise. What you have documented will allow someone to build a flash drive capable of being used to test drive a new machine or to give to someone to try NetBSD. I can see where Julian wants to go with this but to me it seems a bit more that was originally asked for.
You're right. I think the work should be considered done now. Maybe we could open up another task about researching what causes the most write cycles, but then, GCi is nearly over...
Congratulations, this task has been completed successfully.