Re: GRUB / boot easy problems w / USB stick
Some thoughts: 1. bsdlabel -Brw /dev/da0s1 - What is the option r? - bsdlabel is supposed to create standard label which probably means creating da0s1a partition (can you call bsdlabel /dev/da0s1 to see what was created?) So your next command should be newfs /dev/da0s1a rather than newfs /dev/da0s1. And commands after that will need to be adjusted as well. 2. boot0cfg -B -s 1 -t -v 182 /dev/da0 It should be -v -t 182 rather than -t -v 182. Not sure if it matters though. Hope this helps. Andrey Thanks Andrey, great news! placing newfs on /dev/da0s1a instead of /dev/da0s1 really helped. Now GRUB recognizes the filesystem on my usb partition. Here's what's new. #I placed 1 UFS2 partition on my USB key at #/dev/da0s1a. mount /dev/da0s1a /usb mkdir -p /usb/boot/grub #copied all files from /boot to /usb/boot and all files #from /boot/grub to /usb/boot/grub (I know I can make #it smaller but just copying all for now). Next I #invoked the grub shell and did the following: grub root (hd1,0,a) Filesystem type is ufs2, partition type is 0xa5. grub setup (hd1) Checking if /boot/grub/stage1 exists... yes Checking if /boot/grub/stage2 exists... yes Checking if /boot/grub/ufs2_stage1_5 exists... yes Running embed /boot/grub/ufs2_stage1_5 (hd1)... 16 sectors are embedded. Succeeded Running install /boot/grub/stage1 (hd1) (hd1)1+16 p (hd1,0,a)/boot/grub/stage2 /boot/grub/menu.lst... Succeeded Done. #I reboot, and am excited to see the grub menu I've set #up. Here is my menu.lst: default=0 timeout=30 title NewOS root (hd0,0,a) kernel /boot/loader #You might notice I made root hd0. This is actually #helpful for anyone setting GRUB up for the first time. #You see when setting up grub from the shell within #your computer, your first hard drive is always hd0, #and your usb stick can be anything after that (in my #case hd1). You can test this by placing an oddly #named text file in each of your grub directories (1 in #hard drive, 1 in usb stick), then using find from the #grub shell to indicate where that oddly named file is #located: grub find /boot/grub/weirdfile (hd0,0,a) #The main point is that when you reboot to your USB #key, because it's now the first drive, it's probably #going to be hd0, instead of hdx, thus my menu.lst. # Anyway, back to the menu selection. When I choose the 'NewOS', this is what I get: Booting 'NewOS' root (hd0,0,a) Filesystem type is ufs2, partition type is 0xa5 kernel /boot/loader [FreeBSD-a.out, loadaddr=0x20, text=0x1000, data=0x32000, bss=0x0, entry=0x20] BTX loader 1.00 BTX version is 1.01 Consoles: internal video/keyboard BIOS drive C: is disk0 BIOS drive D: is disk1 BIOS 631kB/980480kB available memory FreeBSD/i386 bootstrap loader, Revision 1.1 (root @barney.msu.edu, Sun May 8 03:20:03 UTC 2006) #This is the last line, and if I wait about five #minutes it prints these additional lines: can't load 'kernel' Type '?' for a list of commands, 'help' for more detailed help. OK _ #Again I'm pretty sure I must have the right 'hd' #addressing. I tested this by changing the root #location to (hd1,0,a) which found the boot loader off #of my hard drive and booted. I tested this by moving #the loader from my hard drive out of /boot, and #rebooting, where upon it couldn't find loader anymore. Alright I'll leave it there. (Starving for that little morsel of knowledge out there that will unlock this!) -Fred (p.s. I'm new to the mailing lists, and can't find the charter for any of the groups, anyone have a link? :) Need Mail bonding? Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=listsid=396546091 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: GRUB / boot easy problems w / USB stick
It seems like this thread isn't getting updated when I post for some reason. This will be the last one I try until I figure out what's wrong. #I've done some more tests. In my last post I had booted # from the usb key. the results of lsdev from the boot #loader prompt were: OK lsdev cd devices: disk devices: disk0: BIOS drive C: disk1: BIOS drive D: disk1s1a: FFS disk1s1b: swap disk1s1d: FFS # If I booted from the hard drive first I got: cd devices: disk devices: disk0: BIOS Drive C: disk0s1a: FFS disk0s1b: swap disk1s1d: FFS disk1L BIOS Drive D: #So it's clear that which ever drive is booted from #first between the hard drive and the usb key drive is #going to show up as disk0: BIOS Drive C, but I was #wondering why the disk slices/partition letters for #the USB key don't #show up when I boot from it. Or #even when I boot from the HD and use the loader #prompt? # Again just to quickly restate the problem, when # booting from the USB key, the BTX loader hangs, and # after about 5 minutes I get the loader prompt. The # loader apparently can't find the kernel. When #booting normally I have double checked that the #bsdlabels, filesystems, and required files are at #least present on the key. # I'll keep learning the intimate details of various #config files, and loader commands, and post back if I #find a solution. Thanks again for any bits of know #how you send my way. -Fred Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
GRUB / boot easy problems w / USB stick
--- Andrey Shuvikov [EMAIL PROTECTED] wrote: Did you copy it recursively (with sub-directories)? If yes then you didn't need to copy /boot/grub separately. If no, you'll probably need to copy at least /boot/defaults . And /boot/kernel as well if you really want to boot... Andrey # In /boot I did cp -Rpv * /usb/boot #I'm not sure why it can get as far as the BTX loader #info, but can't manage to load the kernel. It clearly #can read the ufs2 now. I don't really know much about #the specifics of the startup process, but I thought #as soon as the loader was invoked, the first thing it #tries to do is load the kernel into memory. I just #double checked and the kernel is located on the stick #at USB/boot/kernel/kernel. This must have happened to #someone else before. -Fred p.s. just a shot in the dark, but does anyone think grub might not be able to load the kernel because it runs out of some kind of internal allotment of memory? Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
GRUB / boot easy problems w / USB stick
Some thoughts: 1. bsdlabel -Brw /dev/da0s1 - What is the option r? - bsdlabel is supposed to create standard label which probably means creating da0s1a partition (can you call bsdlabel /dev/da0s1 to see what was created?) So your next command should be newfs /dev/da0s1a rather than newfs /dev/da0s1. And commands after that will need to be adjusted as well. 2. boot0cfg -B -s 1 -t -v 182 /dev/da0 It should be -v -t 182 rather than -t -v 182. Not sure if it matters though. Hope this helps. Andrey Thanks Andrey, great news! placing newfs on /dev/da0s1a instead of /dev/da0s1 really helped. Now GRUB recognizes the filesystem on my usb partition. Here's what's new. #I placed 1 UFS2 partition on my USB key at #/dev/da0s1a. mount /dev/da0s1a /usb mkdir -p /usb/boot/grub #copied all files from /boot to /usb/boot and all files #from /boot/grub to /usb/boot/grub (I know I can make #it smaller but just copying all for now). Next I #invoked the grub shell and did the following: grub root (hd1,0,a) Filesystem type is ufs2, partition type is 0xa5. grub setup (hd1) Checking if /boot/grub/stage1 exists... yes Checking if /boot/grub/stage2 exists... yes Checking if /boot/grub/ufs2_stage1_5 exists... yes Running embed /boot/grub/ufs2_stage1_5 (hd1)... 16 sectors are embedded. Succeeded Running install /boot/grub/stage1 (hd1) (hd1)1+16 p (hd1,0,a)/boot/grub/stage2 /boot/grub/menu.lst... Succeeded Done. #I reboot, and am excited to see the grub menu I've set #up. Here is my menu.lst: default=0 timeout=30 title NewOS root (hd0,0,a) kernel /boot/loader #You might notice I made root hd0. This is actually #helpful for anyone setting GRUB up for the first time. #You see when setting up grub from the shell within #your computer, your first hard drive is always hd0, #and your usb stick can be anything after that (in my #case hd1). You can test this by placing an oddly #named text file in each of your grub directories (1 in #hard drive, 1 in usb stick), then using find from the #grub shell to indicate where that oddly named file is #located: grub find /boot/grub/weirdfile (hd0,0,a) #The main point is that when you reboot to your USB #key, because it's now the first drive, it's probably #going to be hd0, instead of hdx, thus my menu.lst. # Anyway, back to the menu selection. When I choose the 'NewOS', this is what I get: Booting 'NewOS' root (hd0,0,a) Filesystem type is ufs2, partition type is 0xa5 kernel /boot/loader [FreeBSD-a.out, loadaddr=0x20, text=0x1000, data=0x32000, bss=0x0, entry=0x20] BTX loader 1.00 BTX version is 1.01 Consoles: internal video/keyboard BIOS drive C: is disk0 BIOS drive D: is disk1 BIOS 631kB/980480kB available memory FreeBSD/i386 bootstrap loader, Revision 1.1 (root @barney.msu.edu, Sun May 8 03:20:03 UTC 2006) #This is the last line, and if I wait about five #minutes it prints these additional lines: can't load 'kernel' Type '?' for a list of commands, 'help' for more detailed help. OK _ #Again I'm pretty sure I must have the right 'hd' #addressing. I tested this by changing the root #location to (hd1,0,a) which found the boot loader off #of my hard drive and booted. I tested this by moving #the loader from my hard drive out of /boot, and #rebooting, where upon it couldn't find loader anymore. Alright I'll leave it there. (Starving for that little morsel of knowledge out there that will unlock this!) -Fred (p.s. I'm new to the mailing lists, and can't find the charter for any of the groups, anyone have a link? :) Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
GRUB / boot easy problems w / USB stick
I am looking for some help to enable booting from a USB stick. After weeks of reading, and attempting I am at a total loss. This all began while I was trying to follow the many excellent tutorials on encrypting whole laptop disks with GELI[1]. These tutorials were great except they didn't really cover how to make the sticks bootable. Here is some of the many things I have tried. Background: My laptop BIOS allows me to pick the boot order from 7 devices, I set them as follows: (1) USB Key (2) USB HDD (3) USB CDROM (4) USB FDC (5) IDE CD (6) IDE HDD (7) PCI BEV Attempt 1: FreeBSD Boot Manager # created a dedicated slice on my 512MB stick with a #UFS2 filesystem. (after fdisk) bsdlabel -Brw /dev/da0s1 newfs /dev/da0s1 # Copied over boot files to usb filesystem. mount /dev/da0s1 /usb mkdir /usb/boot cd /boot cp -Rpv * /usb/boot # Placed FreeBSD boot manager on MBR of USB stick. boot0cfg -B -s 1 -t -v 182 /dev/da0 Problem: When I reboot the laptop keyboard won't allow me to select a partition with the F keys. Attempt 2: GRUB # make install grub from the ports collection. copy #over the files from #/usr/local/share/grub/i386-freebsd/* to /boot/grub. #My understanding was that Grub can read write UFS2 #because of patches since version 0.94. So on my first #attempt I made a single UFS2 partition. mount /dev/da0s1 /usb mkdir -p /usb/boot/grub cd /boot cp -Rpv * /usb/boot cd /boot/grub cp -Rpv * /usb/boot/grub #I invoke the grub shell. There are two devices in my #device map: (hd0) /dev/ad0 (hd1) /dev/da0 # Now if I try to set root in the following ways I'll #get the following: grub root (hd0,0,a) Filesystem type is ufs2, partition type 0xa5 grub root (hd1,0) Filesystem type is unknown, partition type 0xa5 # now before you say it, I also tried (hd1,0,a) but #this is even worse in some situations. Basically I #can't get grub to read or write to the USB stick with #a UFS2 filesystem. Yet it will read write to the #UFS2 filesystem of the native disk. Does anyone know #why? I have tried grub-install which apparently is #successful, but once I attempt to reboot, it hangs #with the word, GRUB printed. Attempt 3: Chainloading GRUB #This time I though I had it. I created S1 FAT #partition and S2 UFS2 partition on the stick. I # was able to use setup from the grub shell to setup #the FAT slice as the location for stage2. On the #ufs2 partition I set up the proper /boot setup above. #I read on an old post and someone mentioned that #boot2 does something stupid, and won't work with a #chainload scenario. I tried it anyways, and it didn't #work. I had heard that it might work if you bounce #boot0 to the beginning of the slice instead of the #disk MBR so I did. boot0cfg -B -s 2 -t 182 -v /dev/da0s2 #seemed to go well. I rebooted, and got as far as #the F key menu, but again nothing worked, and I #couldn't boot. Just to add, I also tried the whole booting FreeBSD from a FAT partition but that just plain doesn't work [2]. Well that's where I am. I can't tell you how much you will rock my world if you can show me how to fix this. These are some ideas I have, but don't know enough to do anything about: (1) BIOS issues; from what I understand each computer manufacturer takes a base bios (phoenix in my case) and proprietories it up. I'm dreading that maybe my BIOS will prevent any of this from working. Doesn't seem to be documentation anywhere on my manufac's site. (2) Bootblocks; Maybe there's some easy modifications or config files for boot blocks I don't know about? Maybe there are some alternatives? (3) GRUB patches; I've been downloading ports from another PC (no network yet)burning to CD, then making. done it twice now. Is there some wonderful patch to GRUB that makes it work with FreeBSD I don't know about? Do any of you have it working? if so , can I copy how you built exactly? Alright, that's all. I'm sorry for the length of this post, it's my first one, and I have seriously dredged pretty hard on my own for a solution. Thanks again. Fred [1] http://www.proportion.ch/index.php?page=31 http://www.daimi.au.dk/~u063592/ http://www.bsdforums.org/forums/showthread.php?threadid=43796 [2] http://docs.FreeBSD.org/cgi/mid.cgi?2002003159.A46044 Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
GRUB / boot easy problems w / USB stick
I am looking for some help to enable booting from a USB stick. After weeks of reading, and attempting I am at a total loss. This all began while I was trying to follow the many excellent tutorials on encrypting whole laptop disks with GELI[1]. These tutorials were great except they didn't really cover how to make the sticks bootable. Here is some of the many things I have tried. Background: My laptop BIOS allows me to pick the boot order from 7 devices, I set them as follows: (1) USB Key (2) USB HDD (3) USB CDROM (4) USB FDC (5) IDE CD (6) IDE HDD (7) PCI BEV Attempt 1: FreeBSD Boot Manager # created a dedicated slice on my 512MB stick with a #UFS2 filesystem. (after fdisk) bsdlabel -Brw /dev/da0s1 newfs /dev/da0s1 # Copied over boot files to usb filesystem. mount /dev/da0s1 /usb mkdir /usb/boot cd /boot cp -Rpv * /usb/boot # Placed FreeBSD boot manager on MBR of USB stick. boot0cfg -B -s 1 -t -v 182 /dev/da0 Problem: When I reboot the laptop keyboard won't allow me to select a partition with the F keys. Attempt 2: GRUB # make install grub from the ports collection. copy #over the files from #/usr/local/share/grub/i386-freebsd/* to /boot/grub. #My understanding was that Grub can read write UFS2 #because of patches since version 0.94. So on my first #attempt I made a single UFS2 partition. mount /dev/da0s1 /usb mkdir -p /usb/boot/grub cd /boot cp -Rpv * /usb/boot cd /boot/grub cp -Rpv * /usb/boot/grub #I invoke the grub shell. There are two devices in my #device map: (hd0) /dev/ad0 (hd1) /dev/da0 # Now if I try to set root in the following ways I'll #get the following: grub root (hd0,0,a) Filesystem type is ufs2, partition type 0xa5 grub root (hd1,0) Filesystem type is unknown, partition type 0xa5 # now before you say it, I also tried (hd1,0,a) but #this is even worse in some situations. Basically I #can't get grub to read or write to the USB stick with #a UFS2 filesystem. Yet it will read write to the #UFS2 filesystem of the native disk. Does anyone know #why? I have tried grub-install which apparently is #successful, but once I attempt to reboot, it hangs #with the word, GRUB printed. Attempt 3: Chainloading GRUB #This time I though I had it. I created S1 FAT #partition and S2 UFS2 partition on the stick. I # was able to use setup from the grub shell to setup #the FAT slice as the location for stage2. On the #ufs2 partition I set up the proper /boot setup above. #I read on an old post and someone mentioned that #boot2 does something stupid, and won't work with a #chainload scenario. I tried it anyways, and it didn't #work. I had heard that it might work if you bounce #boot0 to the beginning of the slice instead of the #disk MBR so I did. boot0cfg -B -s 2 -t 182 -v /dev/da0s2 #seemed to go well. I rebooted, and got as far as #the F key menu, but again nothing worked, and I #couldn't boot. Just to add, I also tried the whole booting FreeBSD from a FAT partition but that just plain doesn't work [2]. Well that's where I am. I can't tell you how much you will rock my world if you can show me how to fix this. These are some ideas I have, but don't know enough to do anything about: (1) BIOS issues; from what I understand each computer manufacturer takes a base bios (phoenix in my case) and proprietories it up. I'm dreading that maybe my BIOS will prevent any of this from working. Doesn't seem to be documentation anywhere on my manufac's site. (2) Bootblocks; Maybe there's some easy modifications or config files for boot blocks I don't know about? Maybe there are some alternatives? (3) GRUB patches; I've been downloading ports from another PC (no network yet)burning to CD, then making. done it twice now. Is there some wonderful patch to GRUB that makes it work with FreeBSD I don't know about? Do any of you have it working? if so , can I copy how you built exactly? Alright, that's all. I'm sorry for the length of this post, it's my first one, and I have seriously dredged pretty hard on my own for a solution. Thanks again. Fred [1] http://www.proportion.ch/index.php?page=31 http://www.daimi.au.dk/~u063592/ http://www.bsdforums.org/forums/showthread.php?threadid=43796 [2] http://docs.FreeBSD.org/cgi/mid.cgi?2002003159.A46044 Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: GRUB / boot easy problems w / USB stick
On 6/2/07, Fred Davidson [EMAIL PROTECTED] wrote: I am looking for some help to enable booting from a USB stick. After weeks of reading, and attempting I am at a total loss. This all began while I was trying to follow the many excellent tutorials on encrypting whole laptop disks with GELI[1]. These tutorials were great except they didn't really cover how to make the sticks bootable. Here is some of the many things I have tried. Background: My laptop BIOS allows me to pick the boot order from 7 devices, I set them as follows: (1) USB Key (2) USB HDD (3) USB CDROM (4) USB FDC (5) IDE CD (6) IDE HDD (7) PCI BEV Attempt 1: FreeBSD Boot Manager # created a dedicated slice on my 512MB stick with a #UFS2 filesystem. (after fdisk) bsdlabel -Brw /dev/da0s1 newfs /dev/da0s1 # Copied over boot files to usb filesystem. mount /dev/da0s1 /usb mkdir /usb/boot cd /boot cp -Rpv * /usb/boot # Placed FreeBSD boot manager on MBR of USB stick. boot0cfg -B -s 1 -t -v 182 /dev/da0 Problem: When I reboot the laptop keyboard won't allow me to select a partition with the F keys. Attempt 2: GRUB # make install grub from the ports collection. copy #over the files from #/usr/local/share/grub/i386-freebsd/* to /boot/grub. #My understanding was that Grub can read write UFS2 #because of patches since version 0.94. So on my first #attempt I made a single UFS2 partition. mount /dev/da0s1 /usb mkdir -p /usb/boot/grub cd /boot cp -Rpv * /usb/boot cd /boot/grub cp -Rpv * /usb/boot/grub #I invoke the grub shell. There are two devices in my #device map: (hd0) /dev/ad0 (hd1) /dev/da0 # Now if I try to set root in the following ways I'll #get the following: grub root (hd0,0,a) Filesystem type is ufs2, partition type 0xa5 grub root (hd1,0) Filesystem type is unknown, partition type 0xa5 # now before you say it, I also tried (hd1,0,a) but #this is even worse in some situations. Basically I #can't get grub to read or write to the USB stick with #a UFS2 filesystem. Yet it will read write to the #UFS2 filesystem of the native disk. Does anyone know #why? I have tried grub-install which apparently is #successful, but once I attempt to reboot, it hangs #with the word, GRUB printed. Attempt 3: Chainloading GRUB #This time I though I had it. I created S1 FAT #partition and S2 UFS2 partition on the stick. I # was able to use setup from the grub shell to setup #the FAT slice as the location for stage2. On the #ufs2 partition I set up the proper /boot setup above. #I read on an old post and someone mentioned that #boot2 does something stupid, and won't work with a #chainload scenario. I tried it anyways, and it didn't #work. I had heard that it might work if you bounce #boot0 to the beginning of the slice instead of the #disk MBR so I did. boot0cfg -B -s 2 -t 182 -v /dev/da0s2 #seemed to go well. I rebooted, and got as far as #the F key menu, but again nothing worked, and I #couldn't boot. Just to add, I also tried the whole booting FreeBSD from a FAT partition but that just plain doesn't work [2]. Well that's where I am. I can't tell you how much you will rock my world if you can show me how to fix this. These are some ideas I have, but don't know enough to do anything about: (1) BIOS issues; from what I understand each computer manufacturer takes a base bios (phoenix in my case) and proprietories it up. I'm dreading that maybe my BIOS will prevent any of this from working. Doesn't seem to be documentation anywhere on my manufac's site. (2) Bootblocks; Maybe there's some easy modifications or config files for boot blocks I don't know about? Maybe there are some alternatives? (3) GRUB patches; I've been downloading ports from another PC (no network yet)burning to CD, then making. done it twice now. Is there some wonderful patch to GRUB that makes it work with FreeBSD I don't know about? Do any of you have it working? if so , can I copy how you built exactly? Alright, that's all. I'm sorry for the length of this post, it's my first one, and I have seriously dredged pretty hard on my own for a solution. Thanks again. Fred [1] http://www.proportion.ch/index.php?page=31 http://www.daimi.au.dk/~u063592/ http://www.bsdforums.org/forums/showthread.php?threadid=43796 [2] http://docs.FreeBSD.org/cgi/mid.cgi?2002003159.A46044 Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Some thoughts: 1. bsdlabel -Brw /dev/da0s1 - What is the option r? - bsdlabel is supposed to create standard label which probably means creating da0s1a partition (can you call