20c24
![]() |
|
|
|
|
|||||||
| Installing & Upgrading Installing and upgrading FreeBSD. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I'd like to have FreeBSD even while travelling so I'm trying to install FreeBSD on usb stick.
I tried to boot from CD and install from FTP on usb stick. This works but with 2 issues: 1. Despite I have a line in /etc/fstab: Code:
/dev/da0s1a / ufs rw 1 1 2. /tmp and /var are on the stick so lots of writing occurs that is not good for this kind of media. I also tried this but there is a mess with fstab in that "howto": it drops me to single user mode and asks to correct fstab that is indeed unusual: Code:
# Device Mountpoint FStype Options Dump Pass# /dev/ufs/FreeBSDonUSB / ufs rw,noatime 1 1 md /tmp mfs rw,-s16M,nosuid,noatime 0 0 md /var/run mfs rw,-s4M,nosuid,noatime 0 0 md /var/log mfs rw,-s16M,nosuid,noatime 0 0 /dev/acd0 /cdrom cd9660 ro,noauto,nosuid 0 0 /proc /proc procfs rw,noauto 0 0 /tmp /var/tmp nullfs rw 0 0 Did somebody successfully installed FreeBSD on usb-stick with swap, /tmp and /var on local HDD or in memory? |
|
#2
|
|||
|
|||
|
Working fine here. No swap, filesystems as suggested by the howto you linked to...
|
|
#3
|
||||
|
||||
|
...gosh, what could be wrong?
I just rebuilt world and kernel from 8-b2 t0 8-rc1. Cannot mount root at all and da0 is not in the list of valid devices ![]() before I at least could mount as ufs:/dev/da0s1a, not now. |
|
#4
|
|||
|
|||
|
Perhaps you're not building correctly?
I recommend using a release installation to set it up. |
|
#5
|
||||
|
||||
|
You meant kernel+world or usb install?
I followed the install by character, but... yes, mistakes happen ![]() Mergemaster? I checked, main configs are correct. Do you have exactly the same fstab as I posted? One more strange thing: the flash appears as twice mounted if inserted into working system. I need to check what's bootable on the stick...otherwise I have to repeat
|
|
#6
|
|||
|
|||
|
This is my fstab:
Code:
/dev/ufs/FreeBSD / ufs rw,noatime 1 1 md /tmp mfs rw,-s16M,nosuid,noatime 0 0 md /var/run mfs rw,-s4M,nosuid,noatime 0 0 md /var/log mfs rw,-s16M,nosuid,noatime 0 0 /dev/acd0 /cdrom cd9660 ro,noauto,nosuid 0 0 /proc /proc procfs rw,noauto 0 0 /tmp /var/tmp nullfs rw 0 0 |
|
#7
|
||||
|
||||
|
Looks the same. What partitions do you have on the stick?
I chose "entire disk" but I have unused before (understandable) and after. The after unused space looks as marked A and I cannot remove it. The stick in mounted as 2 partitions. I'd rather not to reinstall everything 'cause I have only beta2 CD to mount. How to move A from unused to da0s1a? |
|
#8
|
|||
|
|||
|
I have two partitions (slices). One FAT32 slice for generic data, and one BSD slice for my FreeBSD system. I have boot0 installed in the MBR (just in case).
fdisk(8) will allow you to set the active partition. |
|
#9
|
||||
|
||||
|
I reinstalled everything. Anyway I have to do the following at mountroot> prompt that appears every time.
Code:
mountroot> ufs:/dev/da0s1a The only thing I changed in the howto is my volume label: I called it FBSDUSB instead of FreeBSDonUSB. I have in /boot/loader.conf: Code:
geom_label_load="YES" Code:
user@: /usr/obj/usr/usr/src/sys/GENERIC module_register: module g_label already exists! Module g_lable failed to register: 17 ........................................ Trying to mount root from ufs:/dev/ufs/FBSDUSB BOOT MOUNT ERROR: If you have invalid mount options, reboot, and first try the following from the loader prompt: set vfs.root.mountfrom.options=rw and then remove invalid mount options from /etc/fstab |
|
#10
|
||||
|
||||
|
I read man but anyway I'm not fdisk expert. For me it's strange to see this stick always appeared as 2 identical entries: one entry is mountable another is not (file or directory doesn't exist)
Below is fdisk output identical for /dev/da0 and /dev/ufs/FBSDUSB and /dev/da0s1a: Code:
# fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=487 heads=255 sectors/track=63 (16065 blks/cyl)
parameters to be used for BIOS calculations are:
cylinders=487 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 7823592 (3820 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 486/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
#
Code:
# fdisk /dev/da0s1
******* Working on device /dev/da0s1 *******
parameters extracted from in-core disklabel are:
cylinders=486 heads=255 sectors/track=63 (16065 blks/cyl)
parameters to be used for BIOS calculations are:
cylinders=486 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
<UNUSED>
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 0, size 50000 (24 Meg), flag 80 (active)
beg: cyl 0/ head 0/ sector 1;
end: cyl 1023/ head 254/ sector 63
#
Before reinstalling I whipped out everthing and I had only 1 partition. I'd rather not to loose the installation: it works though I have to manually mount root on every boot. Is it possible to correct partition table without loosing all the data? |
|
#11
|
|||
|
|||
|
You are misunderstanding how a PC BIOS MBR works. There is no MBR in the first sector of a partition, so don't try run it on da0s1.
Not sure what you've done wrong. Looks like your fstab is broken. Is there a /dev/ufs/FBSDUSB? Can you mount it as such at the mountroot prompt? If so, check your fstab file for errors. |
|
#12
|
||||
|
||||
|
Thanks. Indeed in depth I don't understand BIOS and disk geometry and only I know is that MBR usually resides on first 64 sectors of HDD. That what I have with this flash:
Code:
Offset Size(ST) End Name PType Desc Subtype Flags 0 63 62 - 12 unused 0 63 7823592 7823654 da0s1 8 freebsd 165 A 7823655 11993 7835647 - 12 unused 0 Also this could be important: Code:
bios_geom=487/255/63 = 7823655 As to fstab I provided it in this thread and as you can see it's exactly the same as yours except label name that cannot be a reason of my troubles, is it? I CANNOT mount the device at mountroot prompt as FBSDUSB, only as /dev/da0s1a. When it was just fat32 formated flash I mounted it under FreeBSD as /dev/da0s1 that's why I tried it again. |
|
#13
|
|||
|
|||
|
I'm not sure why sysinstall's partition tool is reporting that weird amount of unused space at the end. Usually it should be one cylinder's worth of unused space, but I'm not sure that old rule has to be followed any more, and it shouldn't appear to go past the end of the disk. It is not bad sectors that's for sure. You can ignore it I think as fdisk's idea of your partition table looks fine to me.
Quote:
Code:
kern.geom.label.debug=1 |
|
#14
|
||||
|
||||
|
Sorry for the delay.
I reinstalled everything again with the same result ![]() Debug output: Code:
mountroot> GEOM_LABEL [1]:MSDOSFS:da0: FAT12/16 volume not valid GEOM_LABEL [1]:MSDOSFS:da0s1: FAT32 volume not valid GEOM_LABEL [1]:UFS2 file system detected on da0s1a GEOM_LABEL [1]:Lable for provider da0s1a is ufsid/4ac4ac0c82f9c462 GEOM_LABEL [1]:UFS2 file system detected on da0s1a GEOM_LABEL [1]:Label for provider da0s1a is ufs/FBSDUSB GEOM_LABEL [1]:MSDOSFS:da0s1a: no FAT signature found Code:
GEOM_LABEL [1]:Label ufs/FBSDUSB removed GEOM_LABEL [1]:Label ufsid/4ac4ac0c82f9c462 removed Next. I tried the stick on my another machine. Result: Code:
Not ufs Not ufs No /boot/loader FreeBSD/i386 boot Default: 0:fd(0,a)boot/kernel/kernel boot: Not ufs No /boot/kernel/kernel FreeBSD/i386 boot Default: 0:fd(0,a)boot/kernel/kernel boot: 0:da(0,a)boot/kernel/kernel ## I typed this. WARNING: loader(8) metadata is missing! Notes about the HowTo: This doesn't work for me: Code:
# DESTDIR=/mnt ./install.sh DESTDIR=: command not found Code:
# setenv DESTDIR /mnt # ./install.sh Code:
# chroot /mnt /bin/sh # mount_devfs devfs /dev mount_devfs: command not found Code:
# cat >> /etc/rc.conf << EOF ifcofig_DEFAULT="DHCP" must be: # cat >> /mnt/etc/rc.conf << EOF |
|
#15
|
||||
|
||||
|
Quote:
Quote:
Quote:
Quote:
Code:
mount -t devfs devfs /dev |
| The Following User Says Thank You to aragon For This Useful Post: | ||
zeiz (October 2nd, 2009) | ||
|
#16
|
||||
|
||||
|
Finally: I cannot boot the stick on another machine and this makes me to give up at this time...
Anyway thank you very much!
|
|
#17
|
|||
|
|||
|
I recently spotted this:
http://lists.freebsd.org/pipermail/f...er/012361.html That might address the problem you're having. |
|
#18
|
|||
|
|||
|
Could it be the thing I always had to puzzle about with linux where the PC bios calls the partition from a different name. I've had many a struggle figuring out how to boot from external drive or flash changing grub/fstab. Sorry I can just tell you.
|
|
#19
|
|||
|
|||
|
known bug? Making me better at freeBSD for sure. Running from 1 gig flash stick. Typing it what's advised at:
mountpoint> works sometimes. It may be (as said in first link and elsewhere) that typing ufs:/dev/da0 FIVE TIMES (failing each time of course) THEN doing full string: ufs:/dev/da0s1a (or whatever your usb device is) - will work I will try 5-times work-around now. Here's links i found by searching google for: "freebsd usb external boot drive ufs:/dev/da0s1a" http://www.freebsd.org/cgi/query-pr.cgi?pr=138798 http://lists.freebsd.org/pipermail/f...il/006042.html http://old.nabble.com/Re:-Can%27t-bo...d25977274.html |
|
#20
|
|||
|
|||
|
read these how-to guides your answer is there
http://forums.freebsd.org/showthread.php?t=11715 http://forums.freebsd.org/showthread.php?t=11680 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Install FreeBSD 8.0 using a USB stick, failed: No /boot/loader | everypot | Installing & Upgrading | 10 | February 29th, 2012 19:34 |
| usb stick as pass device | slam | Peripheral Hardware | 10 | September 16th, 2009 19:57 |
| Unable to mount ext2 filesystem on USB SATA drive with Live CD | donallen | General | 4 | January 24th, 2009 17:12 |
| install on a usb stick | DemoDoG | Installing & Upgrading | 6 | January 7th, 2009 15:02 |