Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #9983

Re: DOS bootsector needed for NOOBS install?

From "M.O.B. i L." <mobil@orbin.se>
Newsgroups comp.sys.raspberry-pi
Subject Re: DOS bootsector needed for NOOBS install?
Date 2015-11-21 00:51 +0100
Organization A noiseless patient Spider
Message-ID <n2obho$vcd$1@dont-email.me> (permalink)
References <n2lhga$bi7$1@dont-email.me>

Show all headers | View raw


Den 2015-11-19 kl. 23:12, skrev Markus R. Kessler:
> Hi all,
>
> sorry, if this has been asked before. But,
>
> I am now working with some Raspberries for around one year, and now I am
> confused about the following:
>
> I can download NOOBS 1.4.x as a zip ball, and on a Linux machine, it is
> always easy to install the image on a brandnew SD card. These cards are
> always formatted with MS DOS VFAT32, and you just have to mount the
> relevant partition, cd to where it is mounted, and extract the whole
> content of the zip archive to it.
>
> After that you can put the SD card into the Rapsberry, boot from it and
> run the setup procedure.
>
> Not so, if you take a used SD card and format it to again have a VFAT32
> filesystem on it
> ( I do something like "mkdosfs -F 32 /dev/sdb1" ).
>
> A card which you have formatted this way can be used in any MP3 player or
> camera, but when trying to boot your Raspberry from this card, this
> attempt will always fail.
>
> So, there seems to be something different. I just don't know, what
> exactly is missing when formatting a used card.
>
> Does there have to be an "MS DOS master boot record" written to it?
>
> I know that those cards can be purchased "ready-to-use", but I'd like to
> understand, what's going on here.

It must be a bootable W95 FAT32 (LBA) partition. This is from my guide 
at https://github.com/mobluse/coderdojo-raspbian-sv , but I add some 
questions at the end:

##Install##

First you unpack NOOBS on an SD-card. You can use Windows or Mac OS X 
for this, but below is shown for Raspbian Linux.

Skip to next heading if you have a new, blank SD-card.

Use this to list partitions:

     sudo fdisk -l

Use Parted or FDisk to remove all partitions from the SD-card you want 
to format and create a new, bootable W95 FAT32 (LBA) partition, see
[this 
guide](http://qdosmsq.dunbar-it.co.uk/blog/2013/06/noobs-for-raspberry-pi/)
or check this example:

     $ umount /dev/sda1 # Change sda1 to the device you will use.
     $ sudo fdisk /dev/sda

     Command (m for help): d
     Partition number (1-6): 1

     Command (m for help): d
     Partition number (1-6): 2

     Command (m for help): d
     Selected partition 3

     Command (m for help): d
     No partition is defined yet!

     Command (m for help): p

     Disk /dev/sda: 15.9 GB, 15931539456 bytes
     4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
     Units = sectors of 1 * 512 = 512 bytes
     Sector size (logical/physical): 512 bytes / 512 bytes
     I/O size (minimum/optimal): 512 bytes / 512 bytes
     Disk identifier: 0x000825fe

        Device Boot      Start         End      Blocks   Id  System

     Command (m for help): n
     Partition type:
        p   primary (0 primary, 0 extended, 4 free)
        e   extended
     Select (default p): p
     Partition number (1-4, default 1): 1
     Using default value 1
     First sector (2048-31116287, default 2048):
     Using default value 2048
     Last sector, +sectors or +size{K,M,G} (2048-31116287, default 
31116287):
     Using default value 31116287

     Command (m for help): p

     Disk /dev/sda: 15.9 GB, 15931539456 bytes
     4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
     Units = sectors of 1 * 512 = 512 bytes
     Sector size (logical/physical): 512 bytes / 512 bytes
     I/O size (minimum/optimal): 512 bytes / 512 bytes
     Disk identifier: 0x000825fe

        Device Boot      Start         End      Blocks   Id  System
     /dev/sda1            2048    31116287    15557120   83  Linux

     Command (m for help): t
     Selected partition 1
     Hex code (type L to list codes): l

      0  Empty
      1  FAT12
      2  XENIX root      39  Plan 9          83  Linux
      3  XENIX usr
      4  FAT16 <32M      40  Venix 80286     85  Linux extended
      5  Extended
      6  FAT16
      7  HPFS/NTFS/exFAT
      8  AIX
      9  AIX bootable
      a  OS/2 Boot Manag
      b  W95 FAT32
      c  W95 FAT32 (LBA)
      e  W95 FAT16 (LBA)
      f  W95 Ext'd (LBA)
     Hex code (type L to list codes): c
     Changed system type of partition 1 to c (W95 FAT32 (LBA))

     Command (m for help): p

     Disk /dev/sda: 15.9 GB, 15931539456 bytes
     4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
     Units = sectors of 1 * 512 = 512 bytes
     Sector size (logical/physical): 512 bytes / 512 bytes
     I/O size (minimum/optimal): 512 bytes / 512 bytes
     Disk identifier: 0x000825fe

        Device Boot      Start         End      Blocks   Id  System
     /dev/sda1            2048    31116287    15557120    c  W95 FAT32 (LBA)

     Command (m for help): a
     Partition number (1-4): 1

     Command (m for help): p

     Disk /dev/sda: 15.9 GB, 15931539456 bytes
     4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
     Units = sectors of 1 * 512 = 512 bytes
     Sector size (logical/physical): 512 bytes / 512 bytes
     I/O size (minimum/optimal): 512 bytes / 512 bytes
     Disk identifier: 0x000825fe

        Device Boot      Start         End      Blocks   Id  System
     /dev/sda1   *        2048    31116287    15557120    c  W95 FAT32 (LBA)

     Command (m for help): w
     The partition table has been altered!

     Calling ioctl() to re-read partition table.

     WARNING: If you have created or modified any DOS 6.x
     partitions, please see the fdisk manual page for additional
     information.
     Syncing disks.

End of example.

Format and name the SD-card:

     sudo mkdosfs -n dojopi1 -F 32 -I /dev/sda1
(You may need to do `umount /dev/sda1` before. Change sda1 to your 
partition and the name dojopi1 to what you like.)

###Unpack NOOBS to SD-card###

Remove and insert the USB SD-card reader/writer in order to mount 
automatically. Use this to find out where it is mounted:

     mount | grep -i sda1

Stream [NOOBS](http://www.raspberrypi.org/downloads/) down to the 
SD-card using this for small NOOBS files:

     curl -sL http://downloads.raspberrypi.org/NOOBS_latest | bsdtar 
-xvf- -C /media/pi/dojopi1/
alternatively this for big NOOBS files:

     cd /media/pi/dojopi1/
     curl -Lo NOOBS_latest.torrent 
http://downloads.raspberrypi.org/NOOBS_latest.torrent
     ctorrent -p 51414 NOOBS_latest.torrent # Change 51414 to your 
listen port.
     rm NOOBS_latest.torrent
     unzip NOOBS_v1_4_2.zip
     rm NOOBS_v1_4_2.zip

Note: bsdtar doesn't work with the latest very big NOOBS files. Is there 
an updated bsdtar program? Is there a better alternative to ctorrent 
that can download a torrent without a listen port?

Back to comp.sys.raspberry-pi | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

DOS bootsector needed for NOOBS install? "Markus R. Kessler" <dimke.fax@uni.de> - 2015-11-19 22:12 +0000
  Re: DOS bootsector needed for NOOBS install? Dave Farrance <DaveFarrance@OMiTTHiSyahooANDTHiS.co.uk> - 2015-11-20 09:58 +0000
    Re: DOS bootsector needed for NOOBS install? Dave Farrance <DaveFarrance@OMiTTHiSyahooANDTHiS.co.uk> - 2015-11-20 10:10 +0000
      Re: DOS bootsector needed for NOOBS install? The Natural Philosopher <tnp@invalid.invalid> - 2015-11-20 10:15 +0000
        Re: DOS bootsector needed for NOOBS install? "Markus R. Kessler" <dimke.fax@uni.de> - 2015-11-20 14:04 +0000
  Re: DOS bootsector needed for NOOBS install? "M.O.B. i L." <mobil@orbin.se> - 2015-11-21 00:51 +0100
    Re: DOS bootsector needed for NOOBS install? Dom <domafp@blueyonder.co.uk> - 2015-11-21 05:47 +0000
      Re: DOS bootsector needed for NOOBS install? "M.O.B. i L." <mobil@orbin.se> - 2015-11-21 11:39 +0100
        Re: DOS bootsector needed for NOOBS install? Dom <domafp@blueyonder.co.uk> - 2015-11-21 21:15 +0000
          Re: DOS bootsector needed for NOOBS install? Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-21 22:09 +0000
            Re: DOS bootsector needed for NOOBS install? "Markus R. Kessler" <dimke.fax@uni.de> - 2015-11-23 10:14 +0000
            Re: DOS bootsector needed for NOOBS install? Dom <domafp@blueyonder.co.uk> - 2015-11-23 11:08 +0000
              Re: DOS bootsector needed for NOOBS install? "Markus R. Kessler" <dimke.fax@uni.de> - 2015-11-23 11:31 +0000

csiph-web