how to make one bootable USB stick with OpenSolaris 2008.05

本文介绍了如何将OpenSolaris 2008.05安装到USB闪存盘上,以便快速演示其功能。文章提供了两种方法:一种是手动步骤,另一种是使用自动化脚本。还讨论了在过程中可能遇到的问题及解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

One of the nice things about OpenSolaris 2008.05 is that it is delivered as a bootable LiveCD. This means that you can try out the OS easily on your computer and see if it will work without risking the OS you are running on it now. Once you decide that all of the features and drivers work, it's a relatively easy task to do a complete install on your hard disk.

Since it's about 700MB, you can use a relatively cheap - almost free - 1GB USB stick or thumb drive to show somebody how wonderful OpenSolaris is.

I happened to come by a couple of USB sticks and decided to load up 2008.05 on them so they could be carried to a variety of machines and check out how 2008.05 works on them.

I had a little fun trying various tips from the web. Ashok sent me a link to James Liu's blog, and I tried this procedure. It seems to work, and I liked it because it unpacks the steps and let me see what is going on under the covers. One caveat with James' procedure: one of the steps that copies files onto the stick throws a few errors[1].

For a more automated method, try out this one from Dave Miner:

This works like a champ, though to be clear, there is one correction (which I found by reading the scripts):

# ./usbgen <path_to_iso_file> <path_to_usb_image> `pwd` <tmpdir>

This one seems to have gotten messed up in the HTML, or the usbgen script has changed. There are only 3 arguments to usbgen now. I would recommend specifying absolute pathnames for all three arguments, which you can do by prefacing the file names with the `pwd` method.

# ./usbcopy <path_to_usb_image>

Again, an absolute pathname works best here.

Anyway, this method seems to work well, and has very few manual steps. In fact, once you do the "usbgen" step, you can use usbcopy to create multiple sticks from that image. Nice!

The downside with this method is that you need to have the Mercurial tools installed (to do the "hg" command). Fortunately, I had a machine sitting around with all of this infrastructure set up and working.  I suppose the other downside is that you need to run this from a Solaris or OpenSolaris machine, rather than from Windows.

Thanks Dave and James for writing this down. (And, since one of these USB sticks is going to my boss, I know he appreciates it too.)

[1] In the James Liu method, almost at the end, you run the following command:
# cp -rP@ .??* * /mnt/usbdrive

I got the following errors thrown from the cp command:

bin: failed to get acl entries: No such file or directory
boot/solaris/bin/root_archive: failed to get acl entries: No such file or directory
dev/nvidia0: failed to get acl entries: No such file or directory
dev/nvidia1: failed to get acl entries: No such file or directory
dev/nvidia2: failed to get acl entries: No such file or directory
dev/nvidia3: failed to get acl entries: No such file or directory
dev/nvidia4: failed to get acl entries: No such file or directory
dev/nvidia5: failed to get acl entries: No such file or directory
dev/nvidia6: failed to get acl entries: No such file or directory
dev/nvidia7: failed to get acl entries: No such file or directory
dev/nvidiactl: failed to get acl entries: No such file or directory
dev/stderr: failed to get acl entries: No such file or directory
dev/stdin: failed to get acl entries: No such file or directory
dev/stdout: failed to get acl entries: No such file or directory

I'm not sure if these are fatal or not.

====================================================================

OpenSolaris Developer Preview on USB flash drives

Thursday Nov 01, 2007

One of the things we developed between BeleniX and the Live Media project is the ability to run the live CD bits on USB flash drives, and indeed, that's what I mostly demo, because it's a lot faster (boot time is under a minute, install time for the OpenSolaris Developer Preview  is about 7 minutes) - Jonathan loved it when we demo'ed it a couple of weeks ago.  We don't push USB images yet because right now you need to already have Solaris installed in order to copy it to the USB stick.  But if you do have Solaris Nevada (or have installed the preview!) already, and a copy of the preview ISO, you can make a USB flash drive for yourself, as follows:

  1. Use mercurial to get a copy of the Distribution Constructor repository:

    hg clone ssh://anon@hg.opensolaris.org/hg/caiman/distro_constructor

  2. Go into the distro_constructor/tools directory and run usbgen, this will take roughly 10 minutes:

    ./usbgen <path_to_iso_file> <path_to_usb_image> `pwd` <tmpdir>

  3. Plug your USB flash drive into the system, give the system a few seconds to see it, then run usbcopy, this will usually take 3-5 minutes, depending on your flash device; usbcopy will discover all your removable media and let you pick the right device:

    ./usbcopy <path_to_usb_image>

You'll need a 1 GB or larger USB flash device, since the image is 600+ MB.
内容概要:本文详细介绍了基于C++后端和微信小程序前端的校园二手商城的设计与实现。项目旨在提升校园二手交易效率,保障交易安全,促进绿色环保,降低学生生活成本,丰富校园文化生活,支持校园创新创业发展。系统采用C++语言构建高性能后端服务,结合微信小程序实现便捷的前端交互。项目涵盖了用户注册与登录、商品管理、订单处理、用户评价与信用体系、搜索与智能推荐、用户个人中心、消息通知与客服、数据统计与后台管理、安全认证与权限控制、支付结算等多个核心功能模块。此外,系统设计了多维度信用评价体系、智能推荐算法、全程线上化交易流程、全面的安全防护机制以及模块化架构,确保系统的高效、稳定和安全。 适用人群:适用于高校师生,特别是有二手物品交易需求的学生群体,以及对电子商务平台开发感兴趣的计算机专业学生和开发者。 使用场景及目标:① 提升校园二手交易效率,减少信息获取成本;② 构建安全可信的交易环境,保障用户权益;③ 促进校园内闲置物品的循环利用,践行绿色环保理念;④ 降低学生生活成本,提供价格合理、质量可控的二手商品;⑤ 丰富校园文化生活,增强师生间的交流与互助;⑥ 支持校园创新创业,为学生提供实践平台;⑦ 提供便捷的在线支付和评价功能,优化用户体验。 阅读建议:读者应关注项目的技术实现细节,特别是C++后端服务的高效性能设计和微信小程序前端的用户体验优化。同时,理解系统如何通过多维度信用评价体系、智能推荐算法等创新功能提升平台的可信度和用户粘性。在学习过程中,建议结合实际案例进行实践,调试代码,深入理解各个功能模块的设计思路和实现方法。
`bootable/recovery/recovery.cpp` 是 Android 源码中 `recovery` 模块的主要启动代码,该文件定义了 `main()` 函数,用于启动 `recovery` 程序,并执行相应的操作。下面是 `recovery.cpp` 文件的部分代码: ```cpp int main(int argc, char **argv) { RecoveryUI::Options ui_options; ui_options.allow_toggle_display = true; ui_options.locale = ""; RecoveryUI ui(ui_options); ... // Initialize the recovery API. if (register_update_callback(&on_update, &ui)) { LOGE("Can't register the update callback\n"); return EXIT_FAILURE; } ... // Initialize the command listener. if (!strcmp(basename(argv[0]), "recovery")) { // In recovery mode, only listen on the socket. if (socket_name.empty()) { socket_name = DEFAULT_SOCKET; } if (start_recovery_socket(socket_name, &should_abort)) { LOGE("Can't start recovery service with socket '%s'\n", socket_name.c_str()); return EXIT_FAILURE; } } else { ... } ... } ``` 在 `main()` 函数中,首先创建了一个 `RecoveryUI` 对象,用于管理 `recovery` 界面的显示。接着,通过调用 `register_update_callback()` 函数注册了更新回调函数 `on_update()`,用于在更新过程中更新 `recovery` 界面的显示。最后,根据启动命令行参数,启动相应的服务,包括 `recovery` 服务和 `adb` 服务。 需要注意的是,`recovery` 模块的启动和执行过程比较复杂,涉及到诸多细节问题。如果想深入了解 `recovery` 模块的实现原理,需要仔细阅读 `bootable/recovery` 目录下的其他源代码文件。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值