Re: Booting from Memory Stick

2008-03-02 Thread Walker
On Sat, Mar 1, 2008 at 4:23 PM,  [EMAIL PROTECTED] wrote:
 I am working on getting a FreeBSD system to boot from a USB memory stick.

FWIW, my cut/paste script for installing 7.0 to a USB flash drive.
This is adapted from a post by Ceri Davies (thank you!).

** This assumes the drive is at /dev/da0 and that /dev/md0 is not in use **

# set these; the two mount points should not exist
export ISOFILE='/tmp/7.0-RELEASE-i386-disc1.iso'
export ISOMNT='/a'
export USBMNT='/b'

# zero the device for better compression when were done (optional)
dd bs=10m if=/dev/zero of=/dev/da0

# mdconfig and mount the media
mkdir -m 555 ${ISOMNT} ${USBMNT}
mdconfig -a -t vnode -u 0 -f ${ISOFILE}
mount -t cd9660 /dev/md0 ${ISOMNT}

# label and newfs the flash drive
fdisk -BI /dev/da0
bsdlabel -B -w da0s1
newfs -U -L FBSDusb /dev/da0s1a
mount /dev/da0s1a ${USBMNT}

# install the OS
cd ${ISOMNT}/*RELEASE/base
DESTDIR=${USBMNT} ./install.sh

# install the generic kernel
cd ${ISOMNT}/*RELEASE/kernels
DESTDIR=${USBMNT} ./install.sh generic
rmdir ${USBMNT}/boot/kernel
mv ${USBMNT}/boot/GENERIC ${USBMNT}/boot/kernel

# set boot0 options
boot0cfg -v -B -o noupdate -t 90 da0

# install a fstab; adjust as needed (like /tmp size)
cat  ${USBMNT}/etc/fstab  EOF
# Device Mountpoint FStype Options Dump Pass
/dev/ufs/FBSDusb / ufs rw,noatime 1 1
md /tmp mfs rw,-s150M,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
EOF

# install an rc.conf
cat  ${USBMNT}/etc/rc.conf  EOF
ifconfig_DEFAULT=DHCP
ifconfig_fwe0=NOAUTO
ifconfig_plip0=NOAUTO
sshd_enable=YES
syslogd_flags=-vv
sendmail_enable=NONE
EOF

# set root password and timezone (optionally add users here as well)
chroot ${USBMNT} /bin/sh
passwd root
tzsetup

# clean up
cd /
umount ${ISOMNT} ${USBMNT}
rmdir ${ISOMNT} ${USBMNT}
mdconfig -d -u 0

# backup and compress (~ 84MB) (optional)
dd bs=10m if=/dev/da0 of=usbflash-freebsd_7.0.img
nice bzip2 usbflash-freebsd_7.0.img

# done
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Booting from Memory Stick

2008-03-02 Thread Walker
On Sun, Mar 2, 2008 at 11:37 AM, Walker [EMAIL PROTECTED] wrote:
  # set root password and timezone (optionally add users here as well)
  chroot ${USBMNT} /bin/sh
  passwd root
  tzsetup

One error, the above should be:

# set root password and timezone (optionally add users here as well)
chroot ${USBMNT} /bin/sh
passwd root
tzsetup
exit
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Booting from Memory Stick

2008-03-01 Thread jhall
I am working on getting a FreeBSD system to boot from a USB memory stick.

Would it be possible to install the operating system using the following:

cd /usr/src
make DESTDIR=/mnt/usbdisk world
boot0cfg -v -B -o noupdate da0

Or, is there an easier way to do this?

Thanks,


Jay

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Booting from Memory Stick

2008-03-01 Thread Derek Ragona

At 03:23 PM 3/1/2008, [EMAIL PROTECTED] wrote:

I am working on getting a FreeBSD system to boot from a USB memory stick.

Would it be possible to install the operating system using the following:

cd /usr/src
make DESTDIR=/mnt/usbdisk world
boot0cfg -v -B -o noupdate da0

Or, is there an easier way to do this?

Thanks,


Jay


I don't know how to do this myself, but know it is available using FreeNAS, 
which is based on FreeBSD.  FreeNAS information is at:

www.freenas.org

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Booting from Memory Stick

2008-03-01 Thread Tim Kellers
I made a bootable system on a stick a few months ago.  I used it to dd 
clone a WinXP image to some Gateway desktops in a lab.  I think I just 
plugged the stick into my FreeBSD laptop fired up sysinstall and treated 
the stick as a da drive that needed a full install.


Tim


Derek Ragona wrote:

At 03:23 PM 3/1/2008, [EMAIL PROTECTED] wrote:
I am working on getting a FreeBSD system to boot from a USB memory 
stick.


Would it be possible to install the operating system using the 
following:


cd /usr/src
make DESTDIR=/mnt/usbdisk world
boot0cfg -v -B -o noupdate da0

Or, is there an easier way to do this?

Thanks,


Jay


I don't know how to do this myself, but know it is available using 
FreeNAS, which is based on FreeBSD.  FreeNAS information is at:

www.freenas.org

-Derek



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Booting from Memory Stick

2008-03-01 Thread Dominique Goncalves
Hi,

On Sat, Mar 1, 2008 at 10:23 PM,  [EMAIL PROTECTED] wrote:
 I am working on getting a FreeBSD system to boot from a USB memory stick.

  Would it be possible to install the operating system using the following:

  cd /usr/src
  make DESTDIR=/mnt/usbdisk world
  boot0cfg -v -B -o noupdate da0

  Or, is there an easier way to do this?

Yes, the freesbie2 toolkit (http://www.freesbie.org/) does the job very well.

Hope this helps.

  Thanks,


  Jay

  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to [EMAIL PROTECTED]


Regards.

-- 
There's this old saying: Give a man a fish, feed him for a day. Teach
a man to fish, feed him for life.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Booting from Memory Stick

2008-03-01 Thread John Nielsen
On Saturday 01 March 2008 04:23:24 pm [EMAIL PROTECTED] wrote:
 I am working on getting a FreeBSD system to boot from a USB memory
 stick.

 Would it be possible to install the operating system using the
 following:

 cd /usr/src
 make DESTDIR=/mnt/usbdisk world
 boot0cfg -v -B -o noupdate da0

 Or, is there an easier way to do this?

I know you've gotten some other responses, but I wanted to chime in and 
say that I've done this (just today, actually) using an approach similar 
to what you're outlining. In a nutshell:

(assuming USB stick is da0, you don't care about what's on it, and you 
want to use the whole thing with one partition and no swap)

##prepare the destination disk, including boot blocks, and mount
fdisk -BI /dev/da0  #ignore the GEOM not found message
bsdlabel -wB /dev/da0s1
newfs -U -L mystick /dev/da0s1a #optional flags for softupdates and label
mount /dev/ufs/mystick /mnt

##prepare obj tree (skip if you already have one with the kernel you want)
cd /usr/src
make buildworld
make KERNCONF=MYUSBKERNEL   #or GENERIC, whatever

##install to the stick
cd /usr/src
make KERNCONF=MYUSBKERNEL DESTDIR=/mnt installkernel
make DESTDIR=/mnt installworld
mergemaster -i -D /mnt  #review list, answer yes to followup ?'s

##The only other thing that's required is an fstab file:
echo /dev/ufs/mystick / ufs rw 1 1  /mnt/etc/fstab

##and don't forget to un-mount the stick when you're done
umount /mnt

That's a bit quick and dirty, obviously, but you can boot from the stick 
and have a complete system at this point. Setup of the root password, 
users, groups, hostname, interfaces, timezone, etc not included. 
Sysinstall or manual config (either from the initial host or after 
booting from the stick) can get you the rest of the way. Or  you may 
discover that one of the other approaches suggested is easier. :)

JN
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Problem booting from memory-stick with ASUS A7V-133

2007-07-24 Thread ilsa . gold
Hi all,

hope this is the right list.

I have a problem with booting from a 128MB USB-memory-stick with the ASUS 
A7V-133 motherboard. I downloaded the boot-floppy-imageboot.flp (version 6.2) 
from the FreeBSD-FTP-server and dd-ed it to a memory stick. Booting from this 
stick works fine with every other computer I have (a notebook and a newer 
workstation also with an ASUS-board). But trying to boot from the stick with 
the A7V gives me the following output:

- 8 ---
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
- 8 ---

So it seems to me that the BIOS reads the first sector of the memory-stick (the 
MBR) executes the code but then the bootloader seems to have problems with the 
drive geometry or something like this. So does anybody on this list have had 
similar problems or can give me a hint what to do to solve this problem?

BTW: I know that the used floppy-image is just for installation and I'm not 
able to boot a fully running system from it. But it seems to me the 
best/fastest way to test whether booting from the stick works or not.


Thanks a lot in advance
  Stefan
_
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071distributionid=0066

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem booting from memory-stick with ASUS A7V-133

2007-07-24 Thread Steve Bertrand
[EMAIL PROTECTED] wrote:
 Hi all,
 
 hope this is the right list.
 
 I have a problem with booting from a 128MB USB-memory-stick with the ASUS 
 A7V-133 motherboard. I downloaded the boot-floppy-imageboot.flp (version 
 6.2) from the FreeBSD-FTP-server and dd-ed it to a memory stick. Booting 
 from this stick works fine with every other computer I have (a notebook and a 
 newer workstation also with an ASUS-board). But trying to boot from the stick 
 with the A7V gives me the following output:
 
 - 8 ---
 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
 - 8 ---
 

What happens if you enter:

0:da(0,a)/boot/kernel/kernel

...at the boot: prompt (as opposed to fd(0,a)?

Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem booting from memory-stick with ASUS A7V-133

2007-07-24 Thread ilsa . gold
Hi Steve,

  I have a problem with booting from a 128MB USB-memory-stick with the ASUS 
  A7V-133 motherboard. I downloaded the boot-floppy-imageboot.flp (version 
  6.2) from the FreeBSD-FTP-server and dd-ed it to a memory stick. Booting 
  from this stick works fine with every other computer I have (a notebook and 
  a newer workstation also with an ASUS-board). But trying to boot from the 
  stick with the A7V gives me the following output:
  
  - 8 ---
  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
  - 8 ---
  
 
 What happens if you enter:
 
 0:da(0,a)/boot/kernel/kernel
 
 ...at the boot: prompt (as opposed to fd(0,a)?

first of all: Thanks a lot for you very quick response.

Entering this at the prompt gives me the following output (includes the entered 
data):

- 8 ---
boot: 0:da(0,a)/boot/kernel/kernelerror 1 lba 0
No /boot/kernel/kernel
- 8 ---

Any other things I should try?

Best regards,
  Stefan
_
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071distributionid=0066

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]