User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Wed Jul 01, 2015 6:52 pm

Having successfully transferred the filesystem over to an 8gb USB stick from an 8gb SD card:

Did not expand the filesystem before rsync to USB as recommended so now have a small filesystem not using all the 8gb of the USB.

When I formatted the USB using SDFomatter I selected 'Format Size Adjustment' which I assumed allowed the filesystem to be later expanded.

How do I now expand the filesystem? Raspi-config cannot help.

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Wed Jul 01, 2015 7:31 pm

You can expand it manually. It's a little involved, but not too bad.

First you have to change the partition size to fill the whole stick.

Assuming your filesystem is now /dev/sda1, you need to sudo fdisk /dev/sda

Then show the current partition table and note the starting block number of partition 1 (again, assuming sda1).

Next (this sounds scary, but isn't), delete the partition. This won't affect the contents at all.

Now create a new filesystem with the same starting block number, but use the default for the end block.

Double check the new layout to confirm that the start address for the partition is the same as the original.

Write the new layout to the stick.

Reboot.

That has made the partition bigger, but not the filesystem - yet. To do that, run sudo resize2fs /dev/sda1 (again assuming sda1 here). Let that run. When it completes you are done. :)

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Wed Jul 01, 2015 7:47 pm

Now create a new filesystem ...
ITYM "partition", not "filesystem".
with the same starting block number, but use the default for the end block.

Double check the new layout to confirm that the start address for the partition is the same as the original.
Isn't it easier just to use gparted or something like that?
(Assuming you can put the SD card into another machine...)
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Wed Jul 01, 2015 8:16 pm

Joe Schmoe wrote:
Now create a new filesystem ...
ITYM "partition", not "filesystem".
Picky ;)
Isn't it easier just to use gparted or something like that?
(Assuming you can put the SD card into another machine...)
No idea. Never used it. Seemed like too much messing around to me. I prefer to do it myself.

Plus, as you infer, this method doesn't require another machine.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Wed Jul 01, 2015 10:34 pm

rpdom wrote:You can expand it manually. It's a little involved, but not too bad.

First you have to change the partition size to fill the whole stick.

Assuming your filesystem is now /dev/sda1, you need to sudo fdisk /dev/sda

Then show the current partition table and note the starting block number of partition 1 (again, assuming sda1).

Next (this sounds scary, but isn't), delete the partition. This won't affect the contents at all.

Now create a new filesystem with the same starting block number, but use the default for the end block.

Double check the new layout to confirm that the start address for the partition is the same as the original.

Write the new layout to the stick.

Reboot.

That has made the partition bigger, but not the filesystem - yet. To do that, run sudo resize2fs /dev/sda1 (again assuming sda1 here). Let that run. When it completes you are done. :)
Not too scary as I do have a backup :) However:

Code: Select all

pi@raspberrypi ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    1   7.5G  0 disk
└─sda1        8:1    1   7.5G  0 part /
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0    56M  0 part /boot
└─mmcblk0p2 179:2    0     3G  0 part /media/13d368bf-6dbf-4751-8ba1-88bed06bef7
pi@raspberrypi ~ $ sudo fdisk -l

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 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: 0xa6202af7

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     6399999     3138560   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn                                                 't support GPT. Use GNU Parted.


Disk /dev/sda: 8004 MB, 8004304896 bytes
35 heads, 21 sectors/track, 21269 cylinders, total 15633408 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1    15633407     7816703+  ee  GPT
pi@raspberrypi ~ $ sudo fdisk /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Command (m for help):

The 'Start at 1' and the warning do scare me!

I can live with the '1' but what about the warning - I can't use fdisk.

BTW I don't have a linux machine, not counting the B+ which is already doing a job and I cannot afford to risk 'hurting it'! Also it has two USB drives already attached with quite complex bespoke power wiring which is fragile.

[edit] Seems I must use parted of which I have zero experience.

Code: Select all

pi@raspberrypi ~ $ sudo parted /dev/sda
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)unit chs
(parted) print
Model: SanDisk Cruzer Force (scsi)
Disk /dev/sda: 973,34,20
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 973,255,63.  Each cylinder is 8225kB.
Partition Table: gpt

Number  Start    End        File system  Name              Flags
 1      0,32,32  973,33,50  ext4         Linux filesystem

(parted)q
Here endeth tonights trials! The start number is 0,32,32 on partition 1?

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 7:14 am

Ok, that has a GPT partition table (I guess because of the work you did on UUID). Best not use fdisk with it then. Probably better off with using gparted instead. Just quit the fdisk session without saving and all will be fine.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 11:24 am

Yes it all looks ok except (why is there always and except?).

To use parted on sda1 I first need to unmount it but I can't unmount it because it is in use!

Code: Select all

pi@raspberrypi ~ $ sudo parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) rm 1
Error: Partition /dev/sda1 is being used. You must unmount it before you modify
it with Parted.
(parted)q

pi@raspberrypi ~ $ sudo umount /dev/sda1
umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
pi@raspberrypi ~ $

BTW. In removing partition 1 I am assuming that:

Code: Select all

parted -a optimal /dev/sda mkpart primary 0% 100%
Will use the full 8GB

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 12:35 pm

I've never used [g]parted, so don't know how it works.

I've just had a play with gdisk, which is like fdisk but with GPT support. I created a GPT partition table using it, created a filesystem in a partition, deleted and recreated the partition at a larger size (with the same start address - very important!), did the reboot and ran the resize command.

gdisk isn't installed as standard, so you would have to install it.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 2:28 pm

Yes, I saw a suggestion that gdisk could be used so will give it a try.

What I can't get my hear around is:

Code: Select all

pi@raspberrypi ~ $ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 15633408 sectors, 7.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): A2DE1A96-FC22-46CF-8E2A-84D4263FDADC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 15633374
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        15633374   7.5 GiB     8300  Linux filesystem

Command (? for help):q
This shows partition 1 start = 2048 and end = 15633374 which is alreasy the full USB size yet I cannot extend the filesystem within that.

Code: Select all

pi@raspberrypi ~ $ sudo resize2fs /dev/sda1
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 1953915 blocks long.  Nothing to do!
pi@raspberrypi ~ $


User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 3:00 pm

Code: Select all

pi@raspberrypi ~ $ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): d
Using 1

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-15633374, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-15633374, default = 15633374) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
pi@raspberrypi ~ $ sudo resize2fs /dev/sda1
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 1953915 blocks long.  Nothing to do!

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          7.3G  2.6G  4.3G  38% /
/dev/root       7.3G  2.6G  4.3G  38% /
devtmpfs        365M     0  365M   0% /dev
tmpfs            74M  284K   74M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           148M     0  148M   0% /run/shm
/dev/mmcblk0p1   56M   19M   37M  34% /boot
/dev/mmcblk0p2  2.9G  2.9G     0 100% /media/13d368bf-6dbf-4751-8ba1-88bed06bef77
pi@raspberrypi ~ $

Now what?

[edit]
reboot - waiting for root PARTUUID=xxxxxxxxx

So, the UUID has changed. Oh well I have been here once, twice, more times before?

Found new UUID but still hanging.
Last edited by makem on Thu Jul 02, 2015 4:25 pm, edited 1 time in total.

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 3:38 pm

Have you rebooted as it suggested?

Code: Select all

The new table will be used at the next reboot.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 4:26 pm

Yes I did

Now going back to square one to try again using saved img before partition changes

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 4:33 pm

Oh dear :(

If I wasn't busy tomorrow and Saturday I'd offer to have a look at it with you (and a Linux laptop, just in case). :(

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 5:08 pm

Thanks for the offer, it is appeciated but I will persist in my spare time.

Maybe later it would be good to meet up again though.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 5:23 pm

Try again:

Code: Select all

pi@raspberrypi ~ $ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 15633408 sectors, 7.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): A2DE1A96-FC22-46CF-8E2A-84D4263FDADC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 15633374
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        15633374   7.5 GiB     8300  Linux filesystem

Command (? for help): d
Using 1

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-15633374, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-15633374, default = 15633374) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'

Command (? for help): i
Using 1
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: F1526E6B-2B6B-4288-87A1-D2D364ACB1ED
First sector: 2048 (at 1024.0 KiB)
Last sector: 15633374 (at 7.5 GiB)
Partition size: 15631327 sectors (7.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'

Command (? for help): i
Using 1
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: F1526E6B-2B6B-4288-87A1-D2D364ACB1ED
First sector: 2048 (at 1024.0 KiB)
Last sector: 15633374 (at 7.5 GiB)
Partition size: 15631327 sectors (7.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
pi@raspberrypi ~ $
At this point I get to think, do I reboot now because if I do, as before I will lose the pi.

However, if I don't then the UUID I have for the partition will not be correct as I have not rebooted.

[edit] Sucess this time.

I think previously for some reason, I edited the cmdline.txt file on my laptop instead of whilst it was in the pi and therefore before the reboot.

My fstab had not changed, the filesystem had not changed so the error was in the cmdline.txt editing or editing after shutting down the pi.
Now I can try to extend the filesystem.
Last edited by makem on Thu Jul 02, 2015 5:34 pm, edited 1 time in total.

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 5:30 pm

I think at this point you edit the PARTUUID in your cmdline.txt to match one of the GUIDs that it has given you (I have no idea which), then reboot.

After the reboot the partition should be the size of the stick, but the filesystem won't have changed. That's when you do the resize2fs.

Yes, it would be good to meet up again soon. I've had a lot of stuff to deal with over the last 18 months, but I have some free time again now.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 5:38 pm

rpdom wrote: Yes, it would be good to meet up again soon. I've had a lot of stuff to deal with over the last 18 months, but I have some free time again now.
Ditto! I also have had some problems which can be organised after next Monday so any time after that would be good. You can send a PM and we will arrange by phone perhaps.

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 5:54 pm

Code: Select all

pi@raspberrypi ~ $ sudo resize2fs /dev/sda1
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 1953915 blocks long.  Nothing to do!
pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          7.3G  2.6G  4.3G  38% /
/dev/root       7.3G  2.6G  4.3G  38% /
devtmpfs        365M     0  365M   0% /dev
tmpfs            74M  284K   74M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           148M     0  148M   0% /run/shm
/dev/mmcblk0p1   56M   19M   37M  34% /boot
/dev/mmcblk0p2  2.9G  2.9G     0 100% /media/13d368bf-6dbf-4751-8ba1-88bed06bef77
pi@raspberrypi ~ $ sudo fdisk -l

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 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: 0xa6202af7

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     6399999     3138560   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 8004 MB, 8004304896 bytes
35 heads, 21 sectors/track, 21269 cylinders, total 15633408 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1    15633407     7816703+  ee  GPT
pi@raspberrypi ~ $ sudo gdisk
GPT fdisk (gdisk) version 0.8.5

Type device filename, or press <Enter> to exit: /dev/sda
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Command (? for help): i
Using 1
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: F1526E6B-2B6B-4288-87A1-D2D364ACB1ED
First sector: 2048 (at 1024.0 KiB)
Last sector: 15633374 (at 7.5 GiB)
Partition size: 15631327 sectors (7.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'
Command (? for help): q
pi@raspberrypi ~ $ sudo mount /dev/sda1
mount: /dev/sda1 already mounted or / busy
mount: according to mtab, /dev/root is already mounted on /
pi@raspberrypi ~ $

There has to be something more needed to tell the resize script that the partition is not filled.

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 6:02 pm

Just looking at your df output again...

Code: Select all

rootfs          7.3G  2.6G  4.3G  38% /
/dev/root       7.3G  2.6G  4.3G  38% /
Isn't that the root file system using the whole of the 8GB stick?

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 6:22 pm

Well, I have wondered that for a week or so but everywhere I read you must resize the filesystem ater extending the partition.

So I was saving the question for when we meet, "In winblows I see an xxxGB partition with and xx filesystem so why if I see similar in Linux do I need to resize?" I made a new full 'HD' partition and installed the OS on it, do I really need to resize?"

I inteded to ask you to show me the output of df -h for a resized filesystem to compare with mine!

User avatar
rpdom
Posts: 15180
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: HOWTO: Move the filesystem to a USB stick/Drive

Thu Jul 02, 2015 6:28 pm

I suspect the way you created and copied the filesystem means you don't need to expand it, it is already done.

We'll chat about it later :)

User avatar
makem
Posts: 255
Joined: Tue Jun 18, 2013 9:22 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Sun Jul 05, 2015 1:04 pm

Having got a working usb filesystem, installing x11vnc and kweb I decided to try VPN.

During setting this setup I had occasion to reboot and found that the system hung waiting for the usb PARTUUID as had happened previously. Now I know the system has booted recently whilst running from the usb in the same port as from day one so I wondered why it had decided not to find the correct PARTUUID this time.

When I checked I found tht the PARTUUID had changed and was now totally different. I thought this was a fixed attribute, enabling the usb to be moved to any usb port which of course I have not yet tried.

Any thoughts on the matter?

Actually I may have answered my own question:

I didn't get a working vpn so decided to revert to a saved image prior to starting with vpn. I reformatted the usb and wrote the image which then hung. Does the PARTUUID change if reverting to a previous image? If so then it would be necessary to get the new PARTUUID after re-imaging which is easily done.

tekyboy
Posts: 6
Joined: Tue Apr 14, 2015 3:25 am

Re: HOWTO: Move the filesystem to a USB stick/Drive

Sun Jul 26, 2015 11:13 pm

i used this guide on number of pis but today stuck in a challenging situation.

after successfully setting up pi with usb stick and doing all updates whenever i connect my hub which has 5 USB miners connected with it. none of the software detect the usb hub / miners.
i tried minera, bfgminer, cgminer but it seems none of them detect that i had connected usb hub with pi. however when i just simply install anyof the above image to sd card only (without moving file system to usb drive) it works like a charm.

Code: Select all

pi@raspberrypi ~ $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=hub, Driver=hub/7p, 480M
            |__ Port 1: Dev 6, If 0, Class=vend., Driver=cp210x, 12M
            |__ Port 2: Dev 7, If 0, Class=hub, Driver=hub/7p, 480M
                |__ Port 3: Dev 9, If 0, Class=comm., Driver=cdc_acm, 12M
                |__ Port 3: Dev 9, If 1, Class=data, Driver=cdc_acm, 12M
            |__ Port 3: Dev 8, If 0, Class=hub, Driver=hub/7p, 480M
        |__ Port 3: Dev 5, If 0, Class=stor., Driver=usb-storage, 480M
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 009: ID 0483:5740 SGS Thomson Microelectronics
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 005: ID 0951:1642 Kingston Technology DT101 G2
Bus 001 Device 006: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Br                idge / myAVR mySmartUSB light
Bus 001 Device 007: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 008: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
pi@raspberrypi ~ $ tail /var/log/messages
Jul 26 20:24:38 raspberrypi kernel: [   12.184874] usbcore: registered new inter                face driver cp210x
Jul 26 20:24:38 raspberrypi kernel: [   12.286722] cdc_acm: USB Abstract Control                 Model driver for USB modems and ISDN adapters
Jul 26 20:24:38 raspberrypi kernel: [   12.432225] usbserial: USB Serial support                 registered for cp210x
Jul 26 20:24:38 raspberrypi kernel: [   12.557006] cp210x 1-1.2.1:1.0: cp210x co                nverter detected
Jul 26 20:24:38 raspberrypi kernel: [   12.674263] usb 1-1.2.1: cp210x converter                 now attached to ttyUSB0
Jul 26 20:24:38 raspberrypi kernel: [   16.443128] EXT4-fs (sda1): re-mounted. O                pts: (null)
Jul 26 20:24:38 raspberrypi kernel: [   17.472098] EXT4-fs (sda1): re-mounted. O                pts: (null)
Jul 26 20:24:38 raspberrypi kernel: [   27.833810] smsc95xx 1-1.1:1.0 eth0: hard                ware isn't capable of remote wakeup
Jul 26 20:24:38 raspberrypi kernel: [   29.382775] smsc95xx 1-1.1:1.0 eth0: link                 up, 100Mbps, full-duplex, lpa 0xCDE1
Jul 26 20:24:40 raspberrypi kernel: [   38.022788] Adding 524284k swap on /var/s                wap.  Priority:-1 extents:2 across:1138684k FS
pi@raspberrypi ~ $ pberrypi kernel: [   12.286722] cdc_acm: USB Abstract Control                 Model driver for USB modems and ISDN adapters
-bash: pberrypi: command not found
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   12.432225] usbserial: USB Serial support                 registered for cp210x
-bash: Jul: command not found
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   12.557006] cp210x 1-1.2.1:1.0: cp210x co                nverter detected
-bash: Jul: command not found
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   12.674263] usb 1-1.2.1: cp210x converter                 now attached to ttyUSB0
-bash: Jul: command not found
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   16.443128] EXT4-fs (sda1): re-mounted. O                pts: (null)
-bash: syntax error near unexpected token `('
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   17.472098] EXT4-fs (sda1): re-mounted. O                pts: (null)
-bash: syntax error near unexpected token `('
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   27.833810] smsc95xx 1-1.1:1.0 eth0: hard                ware isn't capable of remote wakeup
> Jul 26 20:24:38 raspberrypi kernel: [   29.382775] smsc95xx 1-1.1:1.0 eth0: link                 up, 100Mbps, full-duplex, lpa 0xCDE1
> Jul 26 20:24:40 raspberrypi kernel: [   38.022788] Adding 524284k swap on /var/s                wap.  Priority:-1 extents:2 across:1138684k FSpberrypi kernel: [   12.286722] cdc_acm: USB Abstract Control                 Model driver for USB modems and ISDN adapters
> Jul 26 20:24:38 raspberrypi kernel: [   12.432225] usbserial: USB Serial support                 registered for cp210x
> Jul 26 20:24:38 raspberrypi kernel: [   12.557006] cp210x 1-1.2.1:1.0: cp210x co                nverter detected
> Jul 26 20:24:38 raspberrypi kernel: [   12.674263] usb 1-1.2.1: cp210x converter                 now attached to ttyUSB0
> Jul 26 20:24:38 raspberrypi kernel: [   16.443128] EXT4-fs (sda1): re-mounted. O                pts: (null)
> Jul 26 20:24:38 raspberrypi kernel: [   17.472098] EXT4-fs (sda1): re-mounted. O                pts: (null)
> Jul 26 20:24:38 raspberrypi kernel: [   27.833810] smsc95xx 1-1.1:1.0 eth0: hard                ware isn't capable of remote wakeup
-bash: Jul: command not found
pi@raspberrypi ~ $ Jul 26 20:24:38 raspberrypi kernel: [   29.382775] smsc95xx 1-1.1:1.0 eth0: link                 up, 100Mbps, full-duplex, lpa 0xCDE1
-bash: Jul: command not found
pi@raspberrypi ~ $ Jul 26 20:24:40 raspberrypi kernel: [   38.022788] Adding 524284k swap on /var/s                wap.  Priority:-1 extents:2 across:1138684k FS
-bash: Jul: command not found
pi@raspberrypi ~ $

kenman345
Posts: 4
Joined: Tue May 19, 2015 12:25 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Tue Jul 28, 2015 3:50 pm

I followed the instructions for this and found my unit does not boot anymore. It gets to a point where the last two lines are like follows:

Waiting for root device PARTUUID=.....
random: nonblocking pool is initialized

then it hangs there. It doesnt matter how long I wait. Am I doing something wrong? How should I fix this?

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: HOWTO: Move the filesystem to a USB stick/Drive

Tue Jul 28, 2015 4:12 pm

I'm skeptical of this UUID stuff. It seems like a probably point-of-failure.

I would try it again with root=/dev/sda2

(or whatever it turns out to be)
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “Advanced users”