RetroBSD

2.11BSD operating system for microcontrollers
It is currently Mon Oct 14, 2019 11:52 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Dec 16, 2012 12:43 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
If your Linux system uses "udev" (such as mint, ubuntu, etc) you can easily remove the need for using sudo to dd to your sd card.

As root, create the file /etc/udev/rules.d/50-sdcard.rules and put in it:
Code:
BUS=="usb", KERNEL=="sd[!0-9]", NAME="%k", MODE="0666"
BUS=="usb", KERNEL=="sd[!0-9][0-9]", NAME="%k", MODE="0666"

Then reload the udev rules (on mint this is as follows, but I have seen other variations - at worst, reboot):
Code:
# udevadm control --reload-rules


Then you may need to unplug / plug in your card reader (if you can), but from then on your SD card, and its partitions, should automatically be read and write by anyone on the system:
Code:
# ls -l /dev/sd*
brw-rw---- 1 root disk 8,  0 2012-12-15 11:28 /dev/sda
brw-rw---- 1 root disk 8,  1 2012-12-15 11:28 /dev/sda1
brw-rw---- 1 root disk 8,  2 2012-12-15 11:28 /dev/sda2
brw-rw---- 1 root disk 8,  5 2012-12-15 11:28 /dev/sda5
brw-rw-rw- 1 root disk 8, 16 2012-12-16 00:41 /dev/sdb
brw-rw-rw- 1 root disk 8, 32 2012-12-16 00:41 /dev/sdc
brw-rw-rw- 1 root disk 8, 48 2012-12-16 00:41 /dev/sdd
brw-rw-rw- 1 root disk 8, 49 2012-12-16 00:41 /dev/sdd1
brw-rw-rw- 1 root disk 8, 50 2012-12-16 00:41 /dev/sdd2
brw-rw-rw- 1 root disk 8, 51 2012-12-16 00:41 /dev/sdd3
brw-rw-rw- 1 root disk 8, 64 2012-12-16 00:41 /dev/sde

And, because it is only USB devices, and not the hard drive, by not using sudo you are then protecting yourself against accidentally wiping your hard drive.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission