DO NOT USE IN A LIVE SYSTEM. Do it from other pc, live cd, internal joggler partition, etc.
(as root user)
the example is about resizing the second partition (sda2) of the disk sda. By example, when you have a 4g image transferred to a 8 or more capacity pendrive.
___
umount /dev/sda1
umount /dev/sda2
fdisk /dev/sda
root@openframe:~# fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 8086 MB, 8086618112 bytes
4 heads, 32 sectors/track, 123392 cylinders, total 15794176 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: 0x000b6ddf
Device Boot Start End Blocks Id System
/dev/sda1 * 1 62500 31250 e W95 FAT16 (LBA)
/dev/sda2 63488 1951743 944128 83 Linux
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (62501-15794175, default 62501): 63488
Last sector, +sectors or +size{K,M,G} (63488-15794175, default 15794175): PRESS ENTER
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
then:
root@openframe:~# resize2fs /dev/sda2
Resizing the filesystem on /dev/sda2 to 1966336 (4k) blocks.
and finally a fsck -y /dev/sda2
done
Last edited by guidows on Thu Aug 07, 2014 5:17 am, edited 5 times in total.
I have flip flopped mostly using GParted on another machine and just plugging in the USB stick to said machine.
Recently I did extend the root partition of a 16Gb SSD to an 8 Gb SSD cuz I ran out of space. This gets a bit more involved but did allow for some 24Gb base OS stuff on the OS mounted on the SSD drives. (all internal). I am now seeing 32Gb tiny SSD ZIF drives which would fit inside of the Joggler such that you could do a 32GB USB SSD plus a 32Gb ZIF SSD to give you some 64Gb of internal play space.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens
Castalla, my set up is same ss yours. I've often thought i should do something about partitions but it makes me nervous. If you get this to work can you please post your 'how to'??? It would be much appreciated.
Disk /dev/sda: 16.4 GB, 16391208960 bytes NOTE: This is the 16Gb SSD PATA drive
255 heads, 63 sectors/track, 1992 cylinders, total 32014080 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: 0x0006fc82
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 126975 62464 ef EFI (FAT-12/16/32)
/dev/sda2 126976 626687 249856 82 Linux swap / Solaris
/dev/sda3 626688 32012287 15692800 83 Linux
Disk /dev/mmcblk0: 1028 MB, 1028128768 bytes
4 heads, 16 sectors/track, 31376 cylinders, total 2008064 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: 0x00065065
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 16 125055 62520 ef EFI (FAT-12/16/32)
/dev/mmcblk0p2 125056 625151 250048 83 Linux
/dev/mmcblk0p4 626688 2007039 690176 83 Linux
Disk /dev/uba: 7996 MB, 7996538880 bytes NOTE: This is the 8Gb SSD USB drive
255 heads, 63 sectors/track, 972 cylinders, total 15618240 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: 0x000e8631
Device Boot Start End Blocks Id System
/dev/uba1 * 2048 126975 62464 ef EFI (FAT-12/16/32)
/dev/uba2 126976 626687 249856 82 Linux swap / Solaris
/dev/uba3 626688 15618047 7495680 83 Linux
root@ICS-JogXUbuntu2:~#
root@ICS-JogXUbuntu2:~# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 976 MB in 2.00 seconds = 487.48 MB/sec
Timing buffered disk reads: 84 MB in 3.05 seconds = 27.51 MB/sec
root@ICS-JogXUbuntu2:~# hdparm -tT /dev/uba
/dev/uba:
Timing cached reads: 934 MB in 2.00 seconds = 466.44 MB/sec
Timing buffered disk reads: 72 MB in 3.03 seconds = 23.77 MB/sec
root@ICS-JogXUbuntu2:~# hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 890 MB in 2.00 seconds = 445.04 MB/sec
Timing buffered disk reads: 48 MB in 3.03 seconds = 15.86 MB/sec
root@ICS-JogXUbuntu2:~#
For kicks a regular USB stick plugged into a hub plugged into the Joggler.
Could you try running the bootable USB or CD version of GParted at all. Its the method I use, I must admit I'd be nervous of resizing a partition in the OS that booted from it if I'm honest.
Don't get frustrated; it really is simple to resize a build on a USB stick. I have done that a lot with the Joggler stuff.
Which OS do you typically utilize?
Windows ? Mac ?
Can you boot from a USB stick on said above computer / OS? or can you create a boot CDRom/DVDRom from an ISO?
Another way (doing everything you need just with a Joggler) is to make up an Ubuntu boot stick from one of Buzz's builds booting it via a USB hub with a keyboard and mouse.
I keep one handy next to my playing around Joggler.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens
Yup; personally here never really play with partition data en vivo. That said; and this is me; I wouldn't recommend it.
I have though used command line stuff as above for an unmounted partition and its worked fine; flip flopping between that and Gparted.
Found this and quoted it:
It really depends on the filesystem you are using but in most cases the answer is to use a livecd (Since it comes with gparted) but it is highly NOT recommended to resize a mounted, usable partition.
It is filesystem and partition dependant, different flesystems and partitions will use different methods. AFAIK it's usually used on lvm partitions. If you are using Gparted, the safe thing to do is to umount it first.
Usually you use lvextend and resizefs in lvm partitions. You can find more info on their man pages. Again it's not a good idea to do with "normal" partitions.
First you have to expand the underlying block device. If you are using a conventional partition on a single hard disk, this is not possible. LVM and mdadm can expand the block device, then you can run resize2fs to expand the fs ( assuming it is ext[234] ).
Well, I just can't get this to work with SpqOS 2.
Gone from a working system to a complete mess!
Avoid until somebody else can confirm it works.
Don't have gparted - that's why I tried this method. Blast!
Personally and related to Linux; used to command line and still getting used to GUI (after many many years).
That said I do not like using VI anymore and prefer anything else today.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens
I'm just pointing out that the 'Recipe' above doesn't seem to work on SpqOS 2.06.
You're right - tested tonight and no dice. Procedure is sound, but I'll have to go away and look at the kernel and ext2 resizing. It works pretty well for the Pi people, after all.
castalla wrote:The first thing I notice is that the whole 8gb is already in place. That's without any partition fiddling.
I'm guessing you're just seeing the total size of the stick here - none of the versions of SQPOS will automatically resize; they start off as 1GB unless you play about with GPartEd.
Yup; don't recall anymore what I used but did fit the original XBMC on to the Openframe 7 MMC (2Gb) a while back. Worked fine until I filled up the DB.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens
Well... I checked the recipe. I made the mistake of not explaining clearly that it has to be made from another linux box (I do from sqp OS installed on the internal joggler disk) and, just in case, it is necessary unmount the drive partitions first (in case that you have an automagic mount daemon).
I added the necessary commands and at least for me it worked in SqueezePlay OS 2.06 without any problem in a recent install.