Need a HELP ! How to remove the write protection of Beaglebone ?

41 views
Skip to first unread message

Ichrak Mansour

unread,
Aug 30, 2018, 7:41:33 AM8/30/18
to BeagleBoard
Hello,
I need a help please, I want to change the name of the label of my BeagleBone when I connect it with PC and edit the file start.htm.

I try that, but it have a protection of write, how can I remove this protection or have you another solution to be able writing on the beaglebone ? 


Robert Nelson

unread,
Aug 30, 2018, 10:06:43 AM8/30/18
to Beagle Board, Ichrak Mansour
Which of your 3 emails should i reply to?

Yes, it's RO but the answer is complex, to change it, i want to make
sure i reply to the correct thread, that way users can use the search
functionality to find the answer on their own...

Regards,

--
Robert Nelson
https://rcn-ee.com/

Dennis Lee Bieber

unread,
Aug 30, 2018, 12:09:04 PM8/30/18
to beagl...@googlegroups.com
On Thu, 30 Aug 2018 01:29:32 -0700 (PDT), Ichrak Mansour
<ichrakma...@gmail.com> declaimed the
following:

>I'm using the Beaglebone in IoT mode with the latest debian image.
>
>I tried to modify the name of the Beaglebone disk and modifying its icon,
>as I need to modify start.htm, when I try to modify it or copy an image, an
>alert is displayed this disk is write-protected,
>
>so how can I remove this protection? and how can Ichange start.htm?

On Thu, 30 Aug 2018 04:41:33 -0700 (PDT), Ichrak Mansour
<ichrakma...@gmail.com> declaimed the
following:
Two posts, only three hours apart in the middle of the night, asking
the same question. The group isn't a real-time help line -- after making a
post you should give 12-24 hours before expecting a response.


As for the question... If I understand you, you want to change the
"disk" ("Beaglebone Getting Started") that shows up on Windows when you
connect to a BBB using a USB cable.

About 4 years ago, that was a real FAT partition, and modifications
were easy.

There is no longer a FAT partition on the OS images. It is itself an
"IMG" file that gets mounted as a read-only filesystem.

https://groups.google.com/forum/#!topic/beagleboard/x6sEdTyjmvg

To modify the contents you'll have to modify the IMG file itself. I tried
the long/hard route, but that wasn't usable.

That being:

use sftp to copy the proper .img from /var/local/ to my Windows box
use etcher to write the .img to a small SD card (1GB)
(had to reboot since etcher seems to have totally removed the card readers
from my system display)
insert SD card, edit files on it
use Win32DiskImager to /read/ the SD card to .img file (tried using it to
write, but some utility gave me some message about trying to change MBR and
killed it)
use sftp to copy the new .img file to the BBB -- this failed as the new
image was 1GB and too large for the space on the eMMC. It might have worked
if I used an ancient 128MB "transflash" card instead.


So... with some google work
https://unix.stackexchange.com/questions/316401/how-to-mount-a-disk-image-from-the-command-line
I managed to do this sequence ON THE BBB

debian@beaglebone:~$ sudo losetup -f
/dev/loop0
debian@beaglebone:~$ sudo losetup -P /dev/loop0
/var/local/bb_usb_mass_storage.img
debian@beaglebone:~$ sudo mkdir /media/usbstuff
debian@beaglebone:~$ sudo mount -t vfat /dev/loop0p1 /media/usbstuff
debian@beaglebone:~$ sudo vim /media/usbstuff/test.txt

<some edits to put stuff in the file>

debian@beaglebone:~$ sudo umount /media/usbstuff
debian@beaglebone:~$ sudo losetup -d /dev/loop0
debian@beaglebone:~$

There are probably some mount options that would let the user account
modify the files but for this test I didtn't bother looking for them.

Reboot the BBB, and I get this on Windows:

C:\Users\Wulfraed>dir i:
Volume in drive I is BEAGLEBONE
Volume Serial Number is C15E-456E

Directory of I:\

05/17/2018 03:13 PM <DIR> App
05/17/2018 03:13 PM <DIR> Drivers
05/17/2018 03:13 PM <DIR> Docs
05/17/2018 03:13 PM <DIR> scripts
05/17/2018 03:13 PM 288 autorun.inf
05/17/2018 03:13 PM 41,174 LICENSE.txt
05/17/2018 03:13 PM 32,493 README.htm
05/17/2018 03:13 PM 428 README.md
05/17/2018 03:13 PM 32,493 START.htm
08/30/2018 04:01 PM 105 test.txt
6 File(s) 106,981 bytes
4 Dir(s) 3,434,496 bytes free

C:\Users\Wulfraed>type i:\test.txt

This is just a nonsense file to see if
I can modify the USB visible virtual partition

And edit more


C:\Users\Wulfraed>


--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Reply all
Reply to author
Forward
0 new messages