Hi Kelvin,
        To achieve your task, you basically need to change two things: change 
"rootpath" property to new device path and regenerate device tree. I have no 
OpenSolaris system as I'll demostrate it by using SXDE system as follow:
        1) Figure out new root fs device path. 
                a) Boot system into failsafe mode which will use ramdisk rootfs 
so has no dependency on real hard disk.
                b) Select Solaris system on your USB disk to recover when 
prompted, which will be mounted on /a direcoty.
                c) Find device path of your USB hard disk by executing "mount", 
example output including "/a on /dev/cxtxdxsx"
                d) Find real device path by "ls -l /dev/cxtxdxsx", example 
output as "../../devices/[EMAIL PROTECTED],0/xxxxxx/[EMAIL PROTECTED],0:a"
                e) The rootpath property should be "/[EMAIL 
PROTECTED],0/xxxxx/[EMAIL PROTECTED],0:a"
        2) Set rootpath in bootenv.rc
                a) Edit /a/boot/solaris/bootenv.rc
                b) Change "setprop rootpath xxxxxx" to "setprop rootpath 
/[EMAIL PROTECTED],0/xxxxx/[EMAIL PROTECTED],0:a"
                c) bootadm update-archive -R /a
        3) Regenerate device tree
                a) Create a file named "reconfigure" under /a, which will 
trigger device tree regeneration when reboot
        4) Reboot and enjoy
        You can also achieve the same effect by modify grub menu config by 
appending "-r -B rootpath=/pci0,0/xxxx/disk0,0:a" after "kernel 
/boot/platform/i86pc/kernel/unix". 
  

Chen Jianxun(Kelvin) <> wrote:
> Hi Aubrey
> 
> Thanks a lot for your warmly help, You know, OpenSolaris doesn't
> specify bootpath in grup config file. It was stored in another
> configfile, so is there any way to change it? BTW, are you a Chinese,
> if so and you live in China mainland, I can call you for more clear
> communitation. 
> 
> Aubrey Li 写道:
>> On Tue, Jun 10, 2008 at 9:28 AM, Chen Jianxun(Kelvin)
>> <[EMAIL PROTECTED]> wrote: 
>> 
>>> Hi Aubrey
>>> 
>>> Thank you very much, I know I can resolve this problem by reinstall
>>> grub, but my target is to careate bootable usb disk anywhere, in
>>> another ward, I want to find a way, to change the bootpath
>>> automatically, needn't interactive action during the boot procedure.
>>> 
>>> 
>> I understand your intention.
>> But at least grub need to know where is your root pool.
>> I believe currently grub is statically pointing to the previous
>> device slice. If you want to change the bootpath automatically, it
>> seems we need another Grub plus plus..., :-) 
>> 
>> Thanks,
>> -Aubrey
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to