Manually resizing the SD card on Raspberry Pi
You can also resize the partitions of the SD card that your Pi is running on.
First you need to change the partition table with fdisk. You need to remove the existing partition entries and then create a single new partition than takes the whole free space of the disk. This will only change the partition table, not the partitions data on disk. The start of the new partition needs to be aligned with the old partition!
Start fdisk:
fdisk /dev/mmcblk0
Then delete partitions with d and create a new with n. You can view the existing table with p.
p to see the current start of the main partition
d, 2 to delete the main partition
n p 2 to create a new primary partition, next you need to enter the start of the old main partition and then the size (enter for complete SD card). The main partition on the Debian image from 2012-04-19 starts at 157696, but the start of your partition might be different. Check the p output!
w write the new partition table
Now you need to reboot:
shutdown -r now
After the reboot you need to resize the filesystem on the partition. The resize2fs command will resize your filesystem to the new size from the changed partition table.
resize2fs /dev/mmcblk0p2
This will take a few minutes, depending on the size and speed of your SD card.
When it is done, you can check the new size with:
df -h
# Download v4l-updatelee from https://bitbucket.org/updatelee/v4l-updatelee/downloads and unzip the download
# Now create the patch
cd linux
tar xf linux-media.tar.bz2
cd ../../
diff -ruP media_build/linux/include/uapi/linux/dvb/ updatelee-v4l-updatelee-402bf4f7412b/include/uapi/linux/dvb/ >> UDL_patch.diff
diff -ruP media_build/linux/drivers/media/ updatelee-v4l-updatelee-402bf4f7412b/drivers/media/ >> UDL_patch.diff
cd media_build
mv ../UDL_patch.diff backports/
nano -w backports/backports.txt
# Now change this
[9.255.255]
add api_version.patch
add pr_fmt.patch
add debug.patch
add drx39xxj.patch
# to this
[9.255.255]
add api_version.patch
add pr_fmt.patch
add debug.patch
add drx39xxj.patch
add UDL_patch.diff
# Compile and install dvb modules
./build
sudo make install
sudo cp -R linux/include/uapi/linux/dvb/* /usr/include/linux/dvb/
cd ..
sudo cp -R updatelee-v4l-updatelee-402bf4f7412b/src/updatelee-v4l-updatelee-402bf4f7412b/firmware/* /lib/firmware/
# There is a bug in one of the qwt headers installed from apt-get, so lets fix that
wget http://svn.code.sf.net/p/qwt/code/branches/qwt-6.1/src/qwt_transform.h
sudo cp qwt_transform.h /usr/include/qwt/qwt_transform.h
# Download updateDVB from https://bitbucket.org/updatelee/updatedvb/downloads
# open qtcreator
qtcreator -noload Welcome
# open updateDVB.pro
# click green triange (run) on the lower left
This time I used the Raspberry Pi 2 default build configuration
make bcm2709_defconfig
then
make -j4
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?