Re: Custom Kernel to Memory Stick
On Mar 29, 2010, at 6:30 PM, Aiza wrote: This is the procedure you want to follow. http://forums.freebsd.org/showthread.php?t=11680 And for greater detail http://forums.freebsd.org/showthread.php?t=11715 Thanks for the links. I will give them a try. Jay ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Custom Kernel to Memory Stick
On Mon, 29 Mar 2010 10:49:08 -0500, Jay Hall jh...@socket.net wrote: Ladies and Gentlemen, I have been asked to explore the possibility of booting FreeBSD from a memory stick. This was not a problem; worked great when installed from the distribution CD. What would be the best way to get our custom configuration onto the memory stick? The fastest way I know is to create an image to an 'image' file stored on disk or ramdisk and then dd the image to the USB disk. You can create a suitably large image with truncate(1), e.g.: truncate -s 1g /var/tmp/image.bin Then attach the image to an mdconfig device: mdconfig -a -t vnode -u 20 -f /var/tmp/image.bin Create a filesystem on it, and install everything from your buildworld and buildkernel run: fdisk -BI /dev/md20 bsdlabel -w -B /dev/md20s1 newfs -U /dev/md20s1a Mount the new image partition before installkernel+installworld: mount -t ufs /dev/md20s1a /mnt Then you sould be able to install with DESTDIR pointing to the image partition: cd /usr/src env DESTDIR=/mnt make installkernel installworld Don't forgte to use mergemaster with -D /mnt to install the /mnt/etc files from /usr/src/etc. Then tweak the /mnt/etc/fstab file to point at the USB disk as the root filesystem. Finally detach the image and write it on a USB disk: umount /mnt mdconfig -du 20 dd if=/var/tmp/image.bin of=/dev/da0 bs=4m One of the nice tricks you can use for the root filesystem of the USB disk is to add a UFS label to the USB root filesystem. This way you don't have to assume that the USB root filesystem is called da0s1a but you can use /dev/ufs/LABELNAME in the fstab file of the image partition. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Custom Kernel to Memory Stick
Ladies and Gentlemen, I have been asked to explore the possibility of booting FreeBSD from a memory stick. This was not a problem; worked great when installed from the distribution CD. What would be the best way to get our custom configuration onto the memory stick? Thanks, Jay ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Custom Kernel to Memory Stick
On Mar 29, 2010, at 10:49 AM, Jay Hall wrote: What would be the best way to get our custom configuration onto the memory stick? Ladies and Gentlemen, This is what I have done, but now I cannot mount the memory stick. I create an image of the s1a partition where the kernel I want to copy resides dd if=/dev/ad0s1a of=/home/hallja/s1aimage bs=2048k After preparing the memory stick I use the following command to transfer the image to the memory stick dd if=/home/hallja/ s1aimage of=/dev/da0s1a bs=2048k I am able to mount the memory stick without any problem before I add the image. After adding the image, I try to mount the memory stick using mount /dev/da0s1a /mnt1 And, I receive the following message mount: /dev/da0s1a : Operation not permitted Any suggestions would be greatly appreciated. Thanks, Jay ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Custom Kernel to Memory Stick
On Mar 29, 2010, at 10:49 AM, Jay Hall wrote: What would be the best way to get our custom configuration onto the memory stick? OK, I managed t get our custom configuration on to the memory stick using dump. After getting everything configured, what I thought was correctly, I am able to boot from the memory stick until it is time to mount the root partition. When mounting the root partition from /dev/da0s1a, I receive the following message: Trying to mount root from ufs:/dev/da0s1a ROOT MOUNT ERROR: If you have invalid mount options, reboot and first try the following from the loader prompt: I have tried the suggested courses of action without any success. If I type ufs:/dev/da0s1a I receive the ROOT MOUNT ERROR again. Following is what I have done to create the bootable memory stick. Created two partitions on the memory stick each about 2 GB. sysinstall was used for this. Used bsdlabel to create the necessary labels on the memory stick. sysinstall was used for this. Ran newfs as on all of the labels. This was done from the command prompt. Once everything was created, I mounted the memory stick and created an image of my working installation using dump. boot0cfg was run on the memory stick. boot0cfg -v -B -o noupdate da0 Modified the fstab on the memory stick as follows /dev/da0s1a / rw,noatime 0 0 Everything other than the operating system was left on the hard drive. If anyone has any suggestions how to fix this, please let me know. I am out of ideas. Or, if you can direct me to a howto, that would be fine also. Thanks for all your help and patience. Jay ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Custom Kernel to Memory Stick
Jay Hall wrote: Ladies and Gentlemen, I have been asked to explore the possibility of booting FreeBSD from a memory stick. This was not a problem; worked great when installed from the distribution CD. What would be the best way to get our custom configuration onto the memory stick? This is the procedure you want to follow. http://forums.freebsd.org/showthread.php?t=11680 And for greater detail http://forums.freebsd.org/showthread.php?t=11715 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org