?
Solved

Booting custom kernel from USB (flash drive)

Posted on 2008-06-16
7
Medium Priority
?
750 Views
Last Modified: 2013-11-22
I'm trying to create a dual boot boot flash drive. The system supports booting from USB. I'm using a 2GB drive. No problem partitioning the USB into two equal 1GB slices and mounting at /mnt, Seem to be having a problem doing the installworld and getting it on the USB.

What I'm try to do is:
1) have a two bootable versions of Freebsd on a 2GB USB flash drive
2) Each bootable version is a custom kernel
3) As an extra bonus I'd like to use ZFS exclusively for the hard disk (e.g. boots from USB, and /usr, /home, etc. on the hard disk)

I've seen various fragments scattered around the net but so far I'm not having any luck. Any suggestions?
0
Comment
Question by:1gtx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:srgilani
ID: 21828275
you want to use two different version or two different kernels ?
0
 

Author Comment

by:1gtx
ID: 21828559
Two separate kernels.

One kernel is the normal booting kernel for that machine. The second kernel is for updates. In other words any new kernel is built and placed on the second slice.

When ready to update, system is rebooted using new updated kernel (second slice). Now original kernel (slice one) becomes the backup. If something goes wrong or the newly built slice/kernel is defective, you can rollback to the the original kernel/slice with just a reboot using the the original slice.

Makes updates to a large number of duplicate computers fast and easy. No CPU cycles used doing make world etc. For updates select slice, reboot--Fast.

That's the idea anyway.

Any ideas?
0
 
LVL 62

Accepted Solution

by:
gheist earned 1500 total points
ID: 21842537
You cannot boot from two slices, you need two slices (aka DOS partitions) and disklabel-ed partitions inside
http://wiki.freebsd.org/ZFSOnRoot

It is not Cisco, you can create filesystem snapshot and rollback using UFS.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:1gtx
ID: 21852599
Actually you can boot from two slices, just not at the same time. That's the idea. One slice is active and the other is inactive. When upgrading the kernel you update the inactive kernel and then change it to be the active slice and the original slice becomes the inactive slice:

e.g. boot0cfg -s 2 da0 vs. the normal boot0cfg -s 1 da0

The ZFSOnRoot approach (using partition a of a slice on a usb and then booting the zfs for the harddrive with a small clone of the same slice mounted at the beginning of the zfs drive) is an interesting approach. I'm looking it over to see if it can be used as a framework for solving part of my problem.

Zfs is definitely useful for the rollback feature, but does not appear to give the same advantages as the multiple slice usb boot.

I appreciate the link. It has some unique ideas that I may be able to use.

Any other suggestions?
0
 
LVL 62

Expert Comment

by:gheist
ID: 21853077
I am pretty sure that ZFS has no improvements over UFS that exhibit on 1GB flash filesystem.

BootMgr is able to select active partition at boot from keyboard.
0
 

Author Comment

by:1gtx
ID: 21889645
You are correct on both counts.

Unfortunately I don't seem to be able to communicate what I'm trying to accomplish so I guess that this question will go unanswered.

I appreciate the attempts to help.
0
 
LVL 62

Expert Comment

by:gheist
ID: 21891928
BootMgr is FreeBSD's boot selector. Easiest to install from sysinstall. If you have two (ZFS, UFS) partitions that can be alternated at boot time your setup quite resembles cisco's flash construct and lets you alternate to old system in case update fails.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lets start to have a small explanation what is VAAI(vStorage API for Array Integration ) and what are the benefits using it. VAAI is an API framework in VMware that enable some Storage tasks. It first presented in ESXi 4.1, but only after 5.x sup…
How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question