Raspberry pi,一個好玩的派:第四季 NOOBS

來源:互聯網
上載者:User

標籤:raspberry pi   檔案系統   noobs   raspbian   

今天換個玩法,不繼續深入探索Raspbian系統了,研究一下官網推薦的另一種安裝方法NOOBS。

那麼什麼是NOOBS呢?它是專為Raspberry pi打造的簡單易用的圖形介面的作業系統管理工具。全稱為:New Out Of the Box Software

官方如下:



本工具的初衷就是簡化Raspberry pi安裝系統的繁瑣,因為Raspberry pi的板子買來是不帶系統的,我們需要額外購買SDCard來安裝系統。對很多新手來說,命令列的東西肯定是沒有圖形介面來得簡單易懂。正是由於每個sdcard上面代表著安裝好的系統,我們可以通過多買幾個sdcard就可以持久性的體驗不同的系統,只需通過換個sdcard搞定,真是特別方便。下面來說說我是如果在另一張8G卡用NOOBS安裝系統Raspbian的。

第一步,下載NOOBS

官網連結,記得自己是在Ubuntu下用Firefox瀏覽器下載的,可以斷點續傳。

第二步,格式化SDCard

如果你的SDCard本來就是FAT32檔案系統,那麼跳過這一步。不要被這一步嚇到,如果不用格式化,那麼NOOBS安裝只需要三步:下載、解壓、在Raspberry pi上啟動。

Linux下將SDCard格式化成Fat32檔案系統。用fdisk命令,需要root許可權,或者sudo。插上SDCard卡,執行如下命令:

#fdisk -lDisk /dev/sdb: 8054 MB, 8054112256 bytes49 heads, 29 sectors/track, 11070 cylinders, total 15730688 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000   Device Boot      Start         End      Blocks   Id  System/dev/sdb1            8192    15730687     7861248    b  W95 FAT32

看來我的8G卡現在已經是FAT32系統了,而且就這一個分區。不要緊,過程我還是要執行一遍。
#fdisk /dev/sdb1Command (m for help): dNo partition is defined yet!Command (m for help): pDisk /dev/sdb1: 8049 MB, 8049917952 bytes248 heads, 62 sectors/track, 1022 cylinders, total 15722496 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000     Device Boot      Start         End      Blocks   Id  SystemCommand (m for help): nPartition type:   p   primary (0 primary, 0 extended, 4 free)   e   extendedSelect (default p): pPartition number (1-4, default 1): 1First sector (2048-15722495, default 2048): Using default value 2048Last sector, +sectors or +size{K,M,G} (2048-15722495, default 15722495): Using default value 15722495
Tips:斷行符號(Enter)鍵選擇預設項。
Tips:Enter is means you select default option.

上面建立了一個主要磁碟分割,1號分區。並且設定了啟動和結束的扇區值。我們再來看看建立的情況:
Command (m for help): pDisk /dev/sdb1: 8049 MB, 8049917952 bytes248 heads, 62 sectors/track, 1022 cylinders, total 15722496 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000     Device Boot      Start         End      Blocks   Id  System/dev/sdb1p1            2048    15722495     7860224   83  Linux

好的,我們的分區類型是linux,下面我們再把它轉換成FAT32.
Command (m for help): tSelected partition 1Hex code (type L to list codes): l //attention!This is L! Not number 1. 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris         1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT- 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT- 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT- 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx          5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data     6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / . 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility    8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt          9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access      a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O         b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor       c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs         e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT             f  W95 Ext‘d (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor      12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor      14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary  16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS    17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT            1e  Hidden W95 FAT1 80  Old Minix      Hex code (type L to list codes): bChanged system type of partition 1 to b (W95 FAT32)Command (m for help): pDisk /dev/sdb1: 8049 MB, 8049917952 bytes248 heads, 62 sectors/track, 1022 cylinders, total 15722496 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000     Device Boot      Start         End      Blocks   Id  System/dev/sdb1p1            2048    15722495     7860224    b  W95 FAT32

此時需要將新的分區寫入到sdcard,使用w命令:
Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 22: Invalid argument.The kernel still uses the old table. The new table will be used atthe next reboot or after you run partprobe(8) or kpartx(8)WARNING: If you have created or modified any DOS 6.xpartitions, please see the fdisk manual page for additionalinformation.Syncing disks.mkfs.vfat /dev/sdb1mkfs.vfat 3.0.12 (29 Oct 2011)mkfs.vfat: /dev/sdb1 contains a mounted file system.

值得注意的是,我上面的format操作貌似沒有成功。因為在sdcard中還可以看到原有檔案,
也許是因為防寫保護?還是什麼別的原因?好像我的一系列操作都沒有成功似的。

第三步,將NOOBS檔案解壓到SDCard

如果SDCard本來就是FAT32系統,那麼直接就可以做這一步,這也就是用NOOBS工具安裝系統的方便之所在。

解壓過程:
此時我在sdcard的目錄下,直接執行unzip。
unzip ~/raspberrypi/NOOBS_v1_3_10.zip Archive:  ~/raspberrypi/NOOBS_v1_3_10.zip  inflating: BUILD-DATA                inflating: INSTRUCTIONS-README.txt   extracting: RECOVERY_FILES_DO_NOT_EDIT    inflating: bootcode.bin               creating: defaults/   creating: defaults/slides/  inflating: defaults/slides/A.png      creating: os/   creating: os/Raspbian/  inflating: os/Raspbian/root.tar.xz    inflating: os/Raspbian/boot.tar.xz    inflating: os/Raspbian/partition_setup.sh   extracting: os/Raspbian/Raspbian.png     creating: os/Raspbian/slides_vga/  inflating: os/Raspbian/slides_vga/G.png    inflating: os/Raspbian/slides_vga/B.png    inflating: os/Raspbian/slides_vga/C.png    inflating: os/Raspbian/slides_vga/D.png    inflating: os/Raspbian/slides_vga/E.png    inflating: os/Raspbian/slides_vga/F.png    inflating: os/Raspbian/slides_vga/A.png    inflating: os/Raspbian/partitions.json    inflating: os/Raspbian/flavours.json   extracting: os/Raspbian/Raspbian_-_Boot_to_Scratch.png    inflating: os/Raspbian/os.json       inflating: os/Raspbian/release_notes.txt     creating: os/Data_Partition/ extracting: os/Data_Partition/Data_Partition.png    inflating: os/Data_Partition/partitions.json    inflating: os/Data_Partition/os.json   extracting: os/Data_Partition/data.tar.xz    inflating: recovery.cmdline          inflating: recovery.elf              inflating: recovery.img              inflating: recovery.rfs              inflating: riscos-boot.bin         
第四步,啟動

現在可以把SDCard從電腦上退下來,插到板子上,加電啟動。如所示:





在安裝中,拷貝速度是1.4MB/s,明顯比直接用dd命令將img拷貝到sdcard中慢。

經過漫長的安裝過程,終於成功了。啟動畫面與上一季完全一樣。



參考:

官方安裝文檔:http://www.raspberrypi.org/documentation/installation/noobs.md


Raspberry pi,一個好玩的派:第四季 NOOBS

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.