Loading mfsroot image from included 4th file

Christian Laursen xi at borderworlds.dk
Fri Feb 3 06:38:21 PST 2006


I am trying to add a custom command I can run from the loader to boot
the system with an mfsroot image, but my forth skills are somewhat
lacking.

So far I have the following contained in a file called
/boot/imageloader.4th which I include from loader.rc:
============================================================
marker task-imageloader.4th                                                     
                                                                                
: update                                                                        
        ." Loading updater mfsroot..." cr                                       
\ Load mfsroot here                                                             
        s" ufs:md0a" s" vfs.root.mountfrom" setenv                              
        0 boot                                                                  
;  
============================================================

I am however unsure of the code to load the actual mfsroot image.

If I run the following two commands manually I get the intended result:
OK load -t mfs_root /boot/mfsroot                                               
OK update                                                                       

Any hints would be greatly appreciated.

Thanks.

-- 
Christian Laursen


More information about the freebsd-hackers mailing list