WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Pi model B - booting from external USB best practice  (Read 696 times)

Offline Cyclic

  • Newbie
  • *
  • Posts: 19
Pi model B - booting from external USB best practice
« on: November 28, 2023, 11:18:30 PM »
Hi,

So I'm attempting to get picore to boot from an external USB drive, I'm using a Pi model B so I have to use the "boot from SD FAT partition then use the 2nd partition which is now on the external drive" method.

I made the mmcblk0p2 partition 10Gb on the SD card and the used dd to duplicate it to the external drive. Then tune2fs to generate a new UUID (it copies the SD one) on the external partition.

I've read lots of different articles on using the external partition after boot and tried a few to no avail.

I'm guessing the cmdline.txt file needs to be edited to use the new UUID? I've tried specifying the tce folder with tce=UUID="XXXXX", the root with /dev/sda3 and the UUID. None of those worked.

I suppose the main question is: What is considered to be the best practice for achieving this?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11237
Re: Pi model B - booting from external USB best practice
« Reply #1 on: November 29, 2023, 05:34:03 AM »
Hi Cyclic
I would expect it to behave the same as Tinycore. The  tce=  code
will not be recognized by the kernel and ignored. It will be available
to the system via  /proc/cmdline  for processing by  /etc/init.d/tc-config.

Code: [Select]
tc@E310:~$ cat /proc/cmdline
quiet tce=UUID="543cac60-3224-4cab-b1d5-008407dd9ce8" home=UUID="543cac60-3224-4cab-b1d5-008407dd9ce8" opt=UUID="543cac60-3224-4cab-b1d5-008407dd9ce8" printk.time=1 syslog nodhcp vmalloc=256MB noisapnp nozswap
tc@E310:~$

This is from an entry in my grub menu file:
Code: [Select]
tce=UUID="543cac60-3224-4cab-b1d5-008407dd9ce8"/tce64Since my  tce  directory has a non-standard name, I had to tell it  /tce64
is the place to find  onboot.lst  and other  /tce  entries on that partition.
The  UUID  tells it which partition and  /tce64  is in the root of that partition.

Offline Cyclic

  • Newbie
  • *
  • Posts: 19
Re: Pi model B - booting from external USB best practice
« Reply #2 on: November 29, 2023, 06:43:45 AM »
Hi Rich,

Thanks for your reply. As you stated I can access /proc/cmdline after boot but I cannot edit anything there - I checked it though and it was reflecting the changes I made to cmdline.txt. So I restored my old cmdline.txt, added just the tce= stuff and rebooted, hey presto it's using the correct drive! Must be your magic touch!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11237
Re: Pi model B - booting from external USB best practice
« Reply #3 on: November 29, 2023, 07:00:58 AM »
Hi Cyclic
Sorry, I didn't mean to imply  /proc/cmdline  could be edited. The
/proc  directory is where the operating system exposes various
parameters. The files found there are (to the best of my knowledge)
strictly read only.

... hey presto it's using the correct drive! ...
Glad to hear it's resolved.