Thursday 20 June 2013

SD setup notes - resizing root partition

So I now trying to expand my root partition.  I did sudo su, then raspi-config to get the menu, then choose option 1 to expand the file system.

$ sudo su
# raspi-config

1 Expand Filesystem                   Ensures that all of the SD card storag        
2 Change User Password                Change password for the default user (        
3 Enable Boot to Desktop              Choose whether to boot into a desktop         
4 Internationalisation Options        Set up language and regional settings         
5 Enable Camera                       Enable this Pi to work with the Raspbe        
6 Add to Rastrack                     Add this Pi to the online Raspberry Pi        
7 Overclock                           Configure overclocking for your Pi            
8 Advanced Options                    Configure advanced settings                   
9 About raspi-config                  Information about this configuration t        

                    <Select>                        <Finish>                   

Choosing 1 gets the followng message.

Root partition has been resized.
The filesystem will be enlarged upon the next reboot  

Would you like to reboot now?  

<Yes>  <No> 

Last time I already installed parted.  So this time I just use it.

pi@raspberrypi ~ $ sudo su
root@raspberrypi:/home/pi# apt-get install parted
Reading package lists... Done
Building dependency tree
Reading state information... Done
parted is already the newest version.


root@raspberrypi:/home/pi# parted /dev/mmcblk0
GNU Parted 2.3
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
  align-check TYPE N                        check partition N for TYPE(min|opt)
        alignment
  check NUMBER                             do a simple check on the file system
  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
  help [COMMAND]                           print general help, or help on
        COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition
        table)
  mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on
        partition NUMBER
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
  move NUMBER START END                    move partition NUMBER
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table,
        available devices, free space, all found partitions, or a particular
        partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START
        and END
  resize NUMBER START END                  resize partition NUMBER and its file
        system
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition
        NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and
        copyright information of GNU Parted
(parted) unit chs
(parted) print
Model: SD SU08G (sd/mmc)
Disk /dev/mmcblk0: 966,80,9
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 966,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start     End       Type     File system  Flags
 1      0,130,2   7,165,29  primary  fat16        lba
 2      7,165,30  966,80,9  primary  ext4

(parted)


Last time I checked the partition size.  I don't understand why the partition table is msdos.

(parted) unit chs
(parted) print

Model: SD SU08G (sd/mmc)
Disk /dev/mmcblk0: 966,80,9
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 966,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start     End       Type     File system  Flags
 1      0,130,2   7,165,29  primary  fat16        lba
 2      7,165,30  966,80,9  primary  ext4

(parted)

This time checked again, but found the partitions 1, and 2 don't seem any changes. Perhaps it is already fully formatted and partitioned by Windows program Win32 DiskManager.

Anyway, I will now install OpenCV.

pi@raspberrypi ~ $ sudo su
root@raspberrypi:/home/pi# partid /dev/mmcblk0
bash: partid: command not found
root@raspberrypi:/home/pi# parted /dev/mmcblk0
GNU Parted 2.3
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) unit chs
(parted) print

Model: SD SU08G (sd/mmc)
Disk /dev/mmcblk0: 966,80,9

Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 966,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start     End       Type     File system  Flags
 1      0,130,2   7,165,29  primary  fat16        lba
 2      7,165,30  966,80,9  primary  ext4

(parted) quit
root@raspberrypi:/home/pi# date
Thu Jun 20 02:45:11 UTC 2013

.END













No comments:

Post a Comment