From: Giorgos Keramidas on 13 Feb 2010 01:46 On Fri, 12 Feb 2010 11:18:42 GMT, spooky130u(a)NOSPAM.gmail.com wrote: >> Most external drives (usb, firewire) end up being named /dev/daX, for >> example /dev/da0 or /dev/da1. > > THAT is what I needed most! Thank you! :-) > > As long as I know it's not installing on the internal drive (long story > about cancer, brain surgeries, etc., deleted---suffice to say that I > can't go by what I *SEE* when I look at drive sizes w/o commas inserted > every 3 digits). > >> Note: this also means that memory card readers which are connected >> via usb to a computer often takes up a few /dev/daX devices as well. > > No problem there---I'll just remove all other devices during the install. > I DON'T want to write over the wrong drive, after all. :-) > > Many thanks. You have completely answered my #1 question. Now it's > just a routine (I hope) BSD install. I may be back to ask about > replacements for some apps, but not until I dig through the packages > in 8.0 first (I've only scratched the surface with the ones in 7.0, > but was limited by low CPU speed). It should be ok to install on the /dev/da0 device. I have done this a few times, so here are a few things you probably want to watch out for: * Some times, depending on the order the devices are detected at boot time, the kernel may throw you at the "mountroot>" prompt when you boot from a USB disk. It helps if you use UFS labels to identify the root filesystem on the USB disk. You can use "tunefs -L USBROOT da0s1a" to set the label of a UFS filesystem, or you can simply pass the -L USBROOT option to the newfs(8) utility when you create it. This way you will be able to use "ufs:/dev/ufs/USBROOT" at the mountroot prompt. It is often more convenient than having to guess which one of da0s1a, da1s1a, da2s1a is the 'right' filesystem. * Your /etc/fstab file in the USB root filesystem can also use a UFS label, e.g.: # Device Mountpoint FStype Options Dump Pass# /dev/ufs/USBROOT / ufs rw 1 1 If you already have an installation of FreeBSD, you can probably just copy it over instead of going through sysinstall another time. This is what I usually do to prepare my "rescue" USB disks that I can use to recover from, say, a severaly botched kernel upgrade of FreeBSD-CURRENT. For example, if you start with: * A FreeBSD installation in an internal ad0s1a partition. * A clean USB disk attached as da0 (note that da0 != ad0 here). You can copy everything from the running ad0s1a file system to a new partition on the USB disk by following the steps: 1. If the USB disk may contain sensitive data form previous FreeBSD installations, zero it out: # dd bs=4m if=/dev/zero of=/dev/da0 2. Create a new BIOS partition to the USB disk: # fdisk -BI -b /boot/mbr /dev/da0 3. Create a new BSD label (one file system, using the entire USB disk) to the USB disk: # bsdlabel -w -B /dev/da0s1 4. Create a new file system to the da0s1a BSD partition: # newfs -L USBROOT /dev/da0s1a 5. Mount the new UFS filesystem to /mnt, in preparation for a copy of the running system from ad0s1a: # mount -t ufs /dev/ufs/USBROOT /mnt 6. Copy everything over: # cd / # tar -cv --one-file-system -f - . | tar -xpv -C /mnt -f - 7. Edit the etc/fstab file of the new USB root filesystem at /mnt/etc/fstab and update it to use the /dev/ufs/USBROOT device as its root file system. # vi /mnt/etc/fstab 8. Edit any other startup options in "/mnt/etc/rc.conf", e.g. the hostname and the services enabled at boot time: # vi /mnt/etc/rc.conf 9. Optionally test that you can chroot into the new USB root file system and see if there are tools that you are missing (e.g. some of your favorite ports, or other stuff that you would find useful when you boot from the USB disk): # mount -t devfs devfs /mnt/dev # env -i HOME=/root USER=root SHELL=/bin/csh \ PATH='/bin:/sbin:/usr/bin:/usr/sbin' \ chroot /mnt /bin/csh Now check for installed packages, configuration files, or other stuff that you want to have around in the USB root file system. If everything looks ok, you can return out of the chroot, and umount /mnt/dev: chroot# exit # umount /mnt/dev 10. Unmount the USB root filesystem too: # umount /mnt Now you should be ready to reboot, set your BIOS to boot from the attached USB disk and check if everything has been transferred. Your laptop should boot from the USB disk and use it as its root filesystem. HTH, Giorgos
From: Giorgos Keramidas on 13 Feb 2010 01:47 On Fri, 12 Feb 2010 18:51:57 GMT, spooky130u(a)NOSPAM.gmail.com wrote: > The boot menu got installed on the USB drive, and the BIOS didn't see > it. So, I figured out how to force the BIOS to use the USB drive's > boot manager. It did attempt to boot FreeBSD, but crapped out with an > error screen that I've never seen before. I've already forgotten the > exact text, but it was something like "loadroot#" (give or take). > Basically, it looked like it didn't see the USB drive (even though, > during the boot process up to that point, it did at least mention it > as it scrolled by faster than I could see/read.... You're almost there. See my other post about the "mountroot" prompt.
From: Balwinder S Dheeman on 13 Feb 2010 02:21 On 02/13/2010 12:16 PM, Giorgos Keramidas wrote: > It should be ok to install on the /dev/da0 device. I have done this a > few times, so here are a few things you probably want to watch out for: > > * Some times, depending on the order the devices are detected at boot > time, the kernel may throw you at the "mountroot>" prompt when you > boot from a USB disk. It helps if you use UFS labels to identify > the root filesystem on the USB disk. > > You can use "tunefs -L USBROOT da0s1a" to set the label of a UFS > filesystem, or you can simply pass the -L USBROOT option to the > newfs(8) utility when you create it. > > This way you will be able to use "ufs:/dev/ufs/USBROOT" at the > mountroot prompt. It is often more convenient than having to guess > which one of da0s1a, da1s1a, da2s1a is the 'right' filesystem. > > * Your /etc/fstab file in the USB root filesystem can also use a UFS > label, e.g.: > > # Device Mountpoint FStype Options Dump Pass# > /dev/ufs/USBROOT / ufs rw 1 1 > > If you already have an installation of FreeBSD, you can probably just > copy it over instead of going through sysinstall another time. This is > what I usually do to prepare my "rescue" USB disks that I can use to > recover from, say, a severaly botched kernel upgrade of FreeBSD-CURRENT. > > For example, if you start with: > > * A FreeBSD installation in an internal ad0s1a partition. > > * A clean USB disk attached as da0 (note that da0 != ad0 here). > > You can copy everything from the running ad0s1a file system to a new > partition on the USB disk by following the steps: > > 1. If the USB disk may contain sensitive data form previous FreeBSD > installations, zero it out: > > # dd bs=4m if=/dev/zero of=/dev/da0 > > 2. Create a new BIOS partition to the USB disk: > > # fdisk -BI -b /boot/mbr /dev/da0 > > 3. Create a new BSD label (one file system, using the entire USB > disk) to the USB disk: > > # bsdlabel -w -B /dev/da0s1 > > 4. Create a new file system to the da0s1a BSD partition: > > # newfs -L USBROOT /dev/da0s1a > > 5. Mount the new UFS filesystem to /mnt, in preparation for a copy > of the running system from ad0s1a: > > # mount -t ufs /dev/ufs/USBROOT /mnt > > 6. Copy everything over: > > # cd / > # tar -cv --one-file-system -f - . | tar -xpv -C /mnt -f - > > 7. Edit the etc/fstab file of the new USB root filesystem at > /mnt/etc/fstab and update it to use the /dev/ufs/USBROOT device > as its root file system. > > # vi /mnt/etc/fstab > > 8. Edit any other startup options in "/mnt/etc/rc.conf", e.g. the > hostname and the services enabled at boot time: > > # vi /mnt/etc/rc.conf > > 9. Optionally test that you can chroot into the new USB root file > system and see if there are tools that you are missing (e.g. some > of your favorite ports, or other stuff that you would find useful > when you boot from the USB disk): > > # mount -t devfs devfs /mnt/dev > # env -i HOME=/root USER=root SHELL=/bin/csh \ > PATH='/bin:/sbin:/usr/bin:/usr/sbin' \ > chroot /mnt /bin/csh > > Now check for installed packages, configuration files, or other > stuff that you want to have around in the USB root file system. > > If everything looks ok, you can return out of the chroot, and > umount /mnt/dev: > > chroot# exit > # umount /mnt/dev > > 10. Unmount the USB root filesystem too: > > # umount /mnt > > Now you should be ready to reboot, set your BIOS to boot from the > attached USB disk and check if everything has been transferred. Your > laptop should boot from the USB disk and use it as its root filesystem. Thanks, for quite an informative post :) I also had been facing problems in booting 8.0-CURRENT from USB and, or SD/MMC cards; I'm not sure, but I think there is some problem with 8.0 only, because I can easily install and boot 7.0 and 7.2-CURRENT from the same media and, or drive, port or card of course on the same machine. Until now I had been following http://bit.ly/aeKEpM for installing FreeBSD on a stick or card; though needs minor adaption for latest releases, but worked well up to 7.2-CURRENT. I attempted to do the same with http://yds.coolrat.org/zfsboot/usbinstall still no joy, particularly in the 8.0-CURRENT case again. The FreeBSD 8.0 fails to find and boot from a geom labeled media on USB, that's the /dev/ufs/FreeBSDonUSB here; it drops me at mountroot prompt only if I boot it into a single user mode. -- Balwinder S "bdheeman" Dheeman Registered Linux User: #229709 Anu'z Linux(a)HOME (Unix Shoppe) Machines: #168573, 170593, 259192 Chandigarh, UT, 160062, India Plan9, T2, Arch/Debian/FreeBSD/XP Home: http://werc.homelinux.net/ Visit: http://counter.li.org/
From: spooky130 on 13 Feb 2010 08:05 In article <87tytld44p.fsf(a)kobe.laptop>, Giorgos Keramidas <keramida(a)ceid.upatras.gr> wrote: > * Some times, depending on the order the devices are detected at boot > time, the kernel may throw you at the "mountroot>" prompt when you > boot from a USB disk. In my previous post, I mentioned a never-before-seen (by me) prompt and error message. After reading the above, I do now remember that the prompt was the "mountroot>" prompt. I'll print this list out, and see what happens. My existing install (the system I'm accessing via X from my laptop as I type this) is FreeBSD 7.0, and it's apparently old enough that the ports and packages don't work so well now...so for the laptop's install, I got the DVD release containing the (I think) full ports and packages distro...so I really want to get 8.0 up and running (i.e., don't want to just copy the existing system). I'll be back later today (hopefully) with updates. Oh, just in case I missed it: is there an absolutely safe way that I can install the FreeBSD boot manager on the internal (drive c:/ - M$ XP) drive to dual-boot without having to go into BIOS each time? Thanks, --jim -- 73 DE N5IAL (/4) MiSTie #49997 < Running FreeBSD 7.0 > spooky130u(a)NOSPAM.gmail.com ICBM/Hurricane: 30.39735N 86.60439W Do not look into waveguide with remaining eye!
From: Torfinn Ingolfsen on 13 Feb 2010 10:09 spooky130(a)NOSPAM.gmail.com wrote: > Oh, just in case I missed it: is there an absolutely safe way that I can > install the FreeBSD boot manager on the internal (drive c:/ - M$ XP) > drive to dual-boot without having to go into BIOS each time? Nothing is absolutely safe - that's why you need backups. If you don't trust the (installation of) FreeBSD boot manager, you can always set up the Windows boot manager to boot FreeBSD: http://www.freebsd.org/doc/en/books/faq/disks.html#NT-BOOTLOADER A bit more work, but after that it works. -- Torfinn Ingolfsen, Norway
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: ANDA AKAN MENDAPATKAN BONUS UANG SETIAP HARI Next: Relocating resources with gnu configure |