Primary Content: Home

Sfdisk: cannot open /dev/sdb read-write

The following command which worked on a Scientific Linux server did not work on a Ubuntu server.

sfdisk -d /dev/sda | sfdisk --force /dev/sdb

Here is the error I received.

sudo sfdisk -d /dev/sdb | sfdisk --force /dev/sdc
         /dev/sdc: Permission denied

	sfdisk: cannot open /dev/sdc read-write

Even with Sudo the command refused to do what I expected. After a quick Google search I found the following which simply suggested to double the Sudo command which if you think about it makes sense.

sudo sfdisk -d /dev/sdb | sudo sfdisk --force /dev/sdc

Now I feel stupid, BTW I was creating a RAID 10 array.

How To Create AVG Bootable USB Drive

AVG Rescue CD is great way of removing malware from a Windows PC for when the operating system is unresponsive. You can download the ISO for AVG Rescue CD from AVG at no cost.

Here’s what you will need prior to creating the bootable USB drive:

  1. Download the appropriate .ISO file from the AVG site
  2. Download UNetbootin, Windows application

Format The USB Drive

Make sure the USB drive formatted to the FAT file system. The Windows formatting application works just fine.

format usb

format usb

Creating The Bootable USB

Start UNetbootin by clicking on the executable.

Start executable

Click on Diskimage.


And browse to the location where the AVG Rescue CD .ISO file was downloaded to.


Make sure select the correct .ISO image.


With the .ISO selected you can now select the USB drive where the ISO image will be stored, my USB drive was recognized as F:, and click on OK to start the process.


Process will take a few minutes.


Click on Exit the USB drive was successfully created.


Make sure the BIOS is set to boot from Removable Devices also know as USB drives not doing so will result in not being able to boot from the USB drive.


Update Samsung SCX 3405W Printer Firmware

This post is meant to provide a solution for those you experiencing wireless problems with your Samsung SCX 3405W printer. While the printer itself works just fine I did notice the wireless connectivity would drop and the printer would not hold the assigned static IP address which is essential for a device that is supposed at the same address. Another sign of trouble was that fact that every time I pinged the printer it would result in pings of 500ms to 700ms which is not right for a device that is just a few feet from the access point.

Note: steps may vary since my printer is already updated, I am providing instructions from memory

Visit the following link at the Samsumg support website and click on the firmware section, the download is just 9.5 MB

Here’s what you will need prior to updating the printer firmware:

  1. A Windows computer to perform the upgrade from
  2. Connect the printer to the Windows computer via the USB cable
  3. Firmware SCX3405W_V3.00.01.17.exe downloaded from the Samsung link mentioned above
  4. Patience

Let’s Update

Double click on the executable you downloaded from the Samsung website.

Update printer firmware

Click on Run.

Update printer firmware

Choose USB Connected Printer.

Update printer firmware

Click on Agree.

Update printer firmware

Click on the checkbox(necessary step), now click on Update Firmware. The printer will restart and you will see some digits appear in the printers display, you shouldn’t worry it might take a few minutes to complete.

Update printer firmware

Click on OK and Exit the application.

Update printer firmware


After the update my printer no longer disconnects from the wireless network and whenever I pint the printer results hover at around 16ms to 40ms which is far better than before. The printer can now hold the static IP address I assigned.


Where’s My Traceroute in Ubuntu

By default if you try to use the traceroute command in Ubuntu it will suggest installing the application since there is no application by such name installed.

user@bicerin:~$ traceroute
The program 'traceroute' can be found in the following packages:
* inetutils-traceroute
* traceroute
Try: sudo apt-get install

While you could apt-get install traceroute your way out of it, you could instead use the included mtr application.

mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

I like the way mtr presents the output instead of the normal traceroute applications, mtr constantly pings the address in a live manner and watch the output update according to network conditions.

user@bicerin:~$ mtr

Host Loss% Snt Last Avg Best Wrst StDev
1. OpenWrt.lan 0.0% 3 0.5 0.5 0.4 0.5 0.0
2. ???
3. 0.0% 2 9.3 8.9 8.5 9.3 0.5
4. 0.0% 2 8.8 9.2 8.8 9.6 0.5
5. 0.0% 2 18.0 23.1 18.0 28.3 7.2
6. 0.0% 2 21.2 21.0 20.9 21.2 0.2
7. 0.0% 2 17.3 17.2 17.0 17.3 0.2
8. 0.0% 2 31.8 33.0 31.8 34.2 1.7
9. 0.0% 2 31.6 31.6 31.6 31.7 0.1
10. 0.0% 2 31.9 32.4 31.9 33.0 0.8
11. 0.0% 2 34.8 35.1 34.8 35.3 0.4
12. 0.0% 2 31.9 32.8 31.9 33.7 1.3

I didn’t know about mtr which is why I decided to create this post as a reminder.

Note To Self: Copy Files Between Two Systems with Rsync

I needed to copy a couple hundred GBs of data as a precaution from a VPS to another location for temporary storage since I was about to mess with the file system. After reading the man pages and other blogs I guess this was the best I could come up with.

rsync -arz -e ssh /local_path/ remote_user@ip_address:/remote_path/
-a archive mode
-r recurse into directories
-z compress file during the transfer
-e ssh remote shell SSH

Other parmeters to add:

--partial keep partially transferred files
--delete delete extraneous files from destination dirs

Monitor MDADM Rebuild Progress

Just in case you find your self creating or rebuilding an MDADM array here is a simple combination that will output every two seconds the status of the array.

We combine watch and cat retrieve and update the status of the array.

watch cat /proc/mdstat
Every 2.0s: cat /proc/mdstat                            Tue Mar  5 00:34:35 2013

Personalities : [raid1]
md1 : active raid1 sdc1[1] sdb1[0]
      262011712 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  3.1% (8126080/262011712) finish=20.7min

unused devices: 

Configure Trunking Between Cisco Catalyst 2960 Switches

This tutorial also applies to other Cisco switches. The Cisco Catalyst 2960 is a layer 2 switch, perhaps one of the most commonly used switches I see in the field. Trunking is a solution for connecting two switches at layer 2, trunking even allows for VLANs in both switches to communicate.

2960 Topology

For this tutorial I will create a trunk between two Cisco Catalyst 2960 switches. My Catalyst 2960 come with two gigabit uplink ports, I will use one port on each switch to establish the trunk. By default all VLANs will be able to traverse the trunk(this includes VLAN 1).

SWITCH-A Trunk Configuration

SWITCH-A# configure terminal
SWITCH-A(config)# interface gigabitEthernet 1/1
SWITCH-A(config-if)# description trunk link
SWITCH-A(config-if)# switchport mode trunk
SWITCH-A(config-if)# switchport nonegotiate

Command explanation:

  • switchport mode trunk – Configure interface for trunking mode
  • switchport nonegotiate – Since the interface was manually configure for trunking there is no need to negotiate

SWITCH-B Trunk Configuration

SWITCH-B configuration steps are identical to SWITCH-A.

SWITCH-B# configure terminal
SWITCH-B(config)# interface gigabitEthernet 1/1
SWITCH-B(config-if)# description trunk link
SWITCH-B(config-if)# switchport mode trunk
SWITCH-B(config-if)# switchport nonegotiate


By trunking two switches together the amount of available ports can be increased. The interfaces linking the two switches may be come bottle necks if the switches send more traffic than either the Fast Ethernet or Gigabit Ethernet port used for the trunk can handle, to increase bandwidth between the switches consider adding EtherChannel to the trunk link.

Feel free to leave a comment below, who knows I maybe able to provide some extra assistance.

Delete Multiple VLAN’s at Once – Cisco IOS

The scenario is a simple one, I have a Cisco 2960 switch with 3 VLANs(10 Acct_dept, 12 HR_dept, 20 Guests) that I need to remove. To demonstrate here is the partial output from the Catalyst 2960, use the show vlan command to view all VLANs in the switch.

SW1# show vlan

---- --------------------------------
1    default

10   Acct_dept
12   HR_dept
20   Guests
1002 fddi-default
1003 token-ring-default
1004 fddinet-default

To delete multiple VLANs(range) we use the no parameter, followed by the VLANs range to be deleted. In this case all VLANs between 10 and 20 will be removed. When you delete a VLAN ports assigned to the same will revert back to VLAN 1.

SW1(config)# no vlan 10-20

Issue the show vlan command once again to confirm that all previous VLANs are now removed.

SW1# show vlan

---- --------------------------------
1    default

1002 fddi-default
1003 token-ring-default
1004 fddinet-default


Efficient and less painful for those of us that regularly make changes.

Feel free to leave a comment below, who knows I maybe able to provide some extra assistance.

Creating Ethernet VLANs on Catalyst Switches –

Disable CDP (Cisco Discovery Protocol) – Cisco IOS

CDP or Cisco Discovery Protocol is enable by default on Cisco routers, CDP can be disabled either globally (stops advertisements on all interfaces) or partially by disabling advertisements on specific interface(s).

Disable CDP Globally

R1# configure terminal

R1(config)# no cdp run

Disable CDP on Specific Interface

R1# configure terminal

R1(config)# interface fa0/0

R1(config-if)# no cdp enable

Re-enable CDP

Changed your mind, that’s ok you can re-enable CDP.

R1(config)# cdp run


CDP is usually disable due to security reasons people don’t like to advertise more than they have to, another good reason is CDP happens to be Cisco proprietary if the device on the other side of the interface is not Cisco then there is no reason for CDP to be running in the first place.

Feel free to leave a comment below, who knows I maybe able to provide some extra assistance.

Configuring Cisco Discovery Protocol (CDP)-