Sponsored Content
Operating Systems BSD Bootable usb-stick, need help, sos Post 302992447 by 1in10 on Friday 24th of February 2017 11:15:43 PM
Old 02-25-2017
SOLVED at least it works for me.

I may should say this topic can be set as solved under the condition that it works for me.
It is about a usb-stick with an iso-image on it, Made on a linux machine putting a linux-distro on in, bootable device, to test the distro. I did not like it, disarded it, went back to gparted, formatting it as msdos fat32. This worked well, linux tells me, full space available.
The point is, this device goes from a linux to a BSD and rarely to a Windows machine. That is why I needed the msdos fat32 format. While linux says that everything is okay, BSD mumbles correctly, that there still is a boot partition on the drive.

Once again it works for me this way, not claiming the solution for encrypted partitions or slicing and dicing. So this is a particular solution, but probably helpful for others, who are not using encrypted slices or something just made for ufs. Although there is a slice1.

Code:
# clean the whole partition
gpart destroy -F da0

# set a mbr on the same
gpart create -s mbr da0

# fill the partition
gpart add -t \!12 da0

# format ins msdos style (fat32)
newfs_msdos -F32 /dev/da0s1

Resuming, some things take time. Damn thing.

This would or could work for make it bootable for ufs or BSD, I did not try yet

Code:
# clean it all
gpart destroy -F da0

# set a blank BSD partition 
gpart create -s bsd da0

# set the whole partition for usage of FFS(2)
gpart add -t freebsd-ufs da0

# format it (ffs(2))
newfs -U /dev/da0p1

This is an approach for flash drives

Code:
# Think twice about the name of your device
# clearing the MBR
dd if=/dev/zero of=/dev/da0 bs=2m count=0

# formatting it
newfs /dev/da0

# test test test
mount -t ufs /dev/da0 /mnt

# note da0 may, or may NOT be the correct device - check messages

 

10 More Discussions You Might Find Interesting

1. Linux

bootable USB Stick || Fedora 8

Hello Everybody I am planning to install Fedora core 8 on an extra PC I have; what I wanna do is to boot from a USB stick then install Fedora from an ISO image I already have via FTP. Could any one tell me how to create bootable USB Stick for Fedora as I already found how to install from FTP... (0 Replies)
Discussion started by: ahmed_nasr2001
0 Replies

2. UNIX for Dummies Questions & Answers

Aix usb stick

I have a P-Series Machine running AIX 5.3, it has a USB Port on the front of the server, can I use a USB Stick on AIX platforms?? if so how..:rolleyes: (2 Replies)
Discussion started by: BEVAN
2 Replies

3. BSD

Detecting usb stick in freebsd

I inserted a 8GB usb stick in a number of machine with FreeBSD 7.1, but the medium was not detected: $ dmesg | grep MB usable memory = 4263022592 (4065 MB) avail memory = 4082540544 (3893 MB) pci0: <serial bus, SMBus> at device 31.3 (no driver attached) ad0: 238475MB <WDC WD2500BEVT-00ZCT0... (6 Replies)
Discussion started by: figaro
6 Replies

4. Filesystems, Disks and Memory

Mount USB stick...

Dummies questions, perfect for this. I cannot mount my idiotic usb stick on Slackware, I input the following on non-graphic mode as root: Mount -t vfat /dev/sdc1/usbstick usbstick is the folder i created for mounting my USB, the file system is FAT, and everytime I input that I get some kind... (2 Replies)
Discussion started by: Dax01
2 Replies

5. BSD

Mounting a USB stick in FreeBSD

When mounting a USB stick or pen drive on a FreeBSD machine I always issue the following command: mount -t msdosfs /dev/da0s1 /mnt Something I have always wondered is what the option msdosfs stands for and more importantly, why it is necessary. (7 Replies)
Discussion started by: figaro
7 Replies

6. Shell Programming and Scripting

1 usb stick -> 2 mounted devices

Hello, i am using a solaris thinclient that tries to connecting to a terminalserver. (RDP) Everything works fine, but the usb redirection. If i put in a usb stick i always get 2 usb-drives mounted. If i look in /tmp/SUNWut/mnt/<name of the host> i see 2 devices. One with the name of the... (2 Replies)
Discussion started by: anarcy
2 Replies

7. Ubuntu

Ubuntu on USB stick?

Hey Guys I have an Ubuntu CD and I was thinking of creating like a bootable hard drive with various OS so that I can just boot OSs with t drive and not require the CDs. I was just wondering is there a way I can do this, like have Ubuntu boot from a USB stick? If yes how is that possible(even if I... (3 Replies)
Discussion started by: rbansal2
3 Replies

8. SCO

Mount USB stick

hi Howto mount an USB stick under SCO 5.0.7? BTW ist it possible to mount USB stick in the command line using 'tools' at the Boot: prompt from OpenServer Release 5.0.7 installation CD? (1 Reply)
Discussion started by: ccc
1 Replies

9. Ubuntu

Installing UBUNTU on USB stick

I'd like to install the OS on my stick. I would like to be able to save my works there and install apps or customize the OS. What can I do Ps. At home I use an iMac, but in the school where I work there are only PC... Ty (2 Replies)
Discussion started by: Fabio_Puricelli
2 Replies

10. SCO

How to use USB Stick in UNIXware?

I am trying to use a USB (Pen?) drive on Unixware 7.1.4. The USB stick is in the machine and the machine recognises it when I enter usbprobe as follows: Path - Address Description ----------------------------- +++++++ BUS #2 0 - 1 - HUB "UHCI Root Hub" 1 - 2 - HID "Chicony Wireless Device"... (1 Reply)
Discussion started by: BernP
1 Replies
MKIMG(1)						    BSD General Commands Manual 						  MKIMG(1)

NAME
mkimg -- utility to make disk images SYNOPSIS
mkimg [-H heads] [-P blksz] [-S secsz] [-T tracksz] [-b bootcode] [-f format] [-o outfile] [-v] [-y] -s scheme -p partition [-p partition ...] mkimg --formats | --schemes | --version DESCRIPTION
The mkimg utility creates a disk image from the raw partition contents specified with the partition argument(s) and using the partitioning scheme specified with the scheme argument. The disk image is written to stdout by default or the file specified with the outfile argument. The image file is a raw disk image by default, but the format of the image file can be specified with the format argument. The disk image can be made bootable by specifying the scheme-specific boot block contents with the bootcode argument and, depending on the scheme, with a boot partition. The contents of such a boot partition is provided like any other partition and the mkimg utility does not treat it any differently from other partitions. Some partitioning schemes need a disk geometry and for those the mkimg utility accepts the tracksz and heads arguments, specifying the number of sectors per track and the number of heads per cylinder (resp.) Both the logical and physical sector size can be specified and for that the mkimg utility accepts the secsz and blksz arguments. The secsz argument is used to specify the logical sector size. This is the sector size reported by a disk when queried for its capacity. Modern disks use a larger sector size internally, referred to as block size by the mkimg utility and this can be specified by the blksz argument. The mkimg utility will use the (physical) block size to determine the start of partitions and to round the size of the disk image. The [-v] option increases the level of output that the mkimg utility prints. The [-y] option is used for testing purposes only and is not to be used in production. When present, the mkimg utility will generate pre- dictable values for Universally Unique Identifiers (UUIDs) and time stamps so that consecutive runs of the mkimg utility will create images that are identical. A set of long options exist to query about the mkimg utilty itself. Options in this set should be given by themselves because the mkimg utility exits immediately after providing the requested information. The version of the mkimg utility is printed when the --version option is given. The list of supported output formats is printed when the --formats option is given and the list of supported partitioning schemes is printed when the --schemes option is given. Both the format and scheme lists a space-separated lists for easy handling in scripts. For a more descriptive list of supported partitioning schemes or supported output format, or for a detailed description of how to specify partitions, run the mkimg utility without any arguments. This will print a usage message with all the necessary details. ENVIRONMENT
TMPDIR Directory to put temporary files in; default is /tmp. EXAMPLES
To create a bootable disk image that is partitioned using the GPT scheme and containing a root file system that was previously created using makefs and also containing a swap partition, run the mkimg utility as follows: % mkimg -s gpt -b /boot/pmbr -p freebsd-boot:=/boot/gptboot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G -o gpt.img The command line given above results in a raw image file. This is because no output format was given. To create a VMDK image for example, add the -f vmdk argument to the mkimg utility and name the output file accordingly. A nested partitioning scheme is created by running the mkimg utility twice. The output of the first will be fed as the contents of a parti- tion to the second. This can be done using a temporary file, like so: % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G -o /tmp/bsd.img % mkimg -s mbr -b /boot/mbr -p freebsd:=/tmp/bsd.img -o mbr-bsd.img Alternatively, the mkimg utility can be run in a cascaded fashion, whereby the output of the first is fed directly into the second. To do this, run the mkimg utility as follows: % mkimg -s mbr -b /boot/mbr -p freebsd:-'mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G' -o mbr-bsd.img To accomodate the need to have partitions named or numbered in a certain way, the mkimg utility allows for the specification of empty parti- tions. For example, to create an image that is compatible with partition layouts found in /etc/disktab, the 'd' partition often needs to be skipped. This is accomplished by inserting an unused partition after the first 2 partition specifications. It is worth noting at this time that the BSD scheme will automatically skip the 'c' partition by virtue of it referring to the entire disk. To create an image that is com- patible with the qp120at disk, use the mkimg utility as follows: % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::20M -p- -p- -p- -p- -p freebsd-ufs:=usr-file-system.ufs -o bsd.img For partitioning schemes that feature partition labels, the mkimg utility supports assigning labels to the partitions specified. In the fol- lowing example the file system partition is labeled as 'backup': % mkimg -s gpt -p freebsd-ufs/backup:=file-system.ufs -o gpt.img SEE ALSO
gpart(8), makefs(8), mdconfig(8), newfs(8) HISTORY
The mkimg utility first appeared in FreeBSD 10.1. AUTHORS
The mkimg utility and manpage were written by Marcel Moolenaar <marcelm@juniper.net> BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 03:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy