Menu

How to create bootable pendrive with Fedora 20 linux… on linux

0 Comments

logo
How to make a bootable linux pendrive?
How to create bootable linux stick under linux?

Installed OS: Fedora 20

Introduction

I re-installed Windows 7 on disk where exists my home linux installation – Fedora 20 .

After windows reinstall process linux bootloader are removed.

My mainboard don’t have connectors to plug an DVD, but i have external adapter to connect it.

I have an external DVD recorder but he is broken – sometime he fail to work. So i can’t use CD.

How to run an Fedora linux an create bootloader again? Maybe from USB stick?

Yes, we use pendrive this time…

 

Content:

  • 001-004 – Method 1 – using dd command
  • 005-011 – Method 2 – using Nautilus (file manager)

 

 


 FIRST METHOD
– using “dd” command

 

001. Preparation

There are few different method to write an usb stick in linux, so i present simpliest…

First method is simplest i’ve ever used. I don’t think, that this will work, but i tested it… and i wondered – i succesfully boot linux from my pendrive…

(i used virtial machine on windows to create it – strange, yea?)

Download Fedora iso and prepare usb stick.


 

 

002. Check devices.

First – check, drive where You want to place linux – to avoid mistakes. Be sure, that specified device is an pendrive.

You can watch system log to read what device is an pendrive – just insert pendrive and observe new entries.

journalctl -f
-- Logs begin at Sat 2014-03-22 15:14:39 CET. --
Nov 17 17:46:40 fedora20.linux kernel: usb 1-1: new high-speed USB device number 5 using ehci-pci
Nov 17 17:46:41 fedora20.linux kernel: usb 1-1: New USB device found, idVendor=3538, idProduct=0070
Nov 17 17:46:41 fedora20.linux kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 17 17:46:41 fedora20.linux kernel: usb 1-1: Product: PQI USB Flash drive
Nov 17 17:46:41 fedora20.linux kernel: usb 1-1: Manufacturer: PQI
Nov 17 17:46:41 fedora20.linux kernel: usb 1-1: SerialNumber: U61IICDV
Nov 17 17:46:41 fedora20.linux kernel: usb-storage 1-1:1.0: USB Mass Storage device detected
Nov 17 17:46:41 fedora20.linux kernel: scsi host6: usb-storage 1-1:1.0
Nov 17 17:46:41 fedora20.linux mtp-probe[2939]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:.../1-1"
Nov 17 17:46:41 fedora20.linux mtp-probe[2939]: bus: 1, device: 5 was not an MTP device
Nov 17 17:46:42 fedora20.linux kernel: scsi 6:0:0:0: Direct-Access Generic USB Flash Disk 8.07 PQ: 0 ANSI: 2
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: [sdb] 7886848 512-byte logical blocks: (4.03 GB/3.76 GiB)
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: [sdb] Write Protect is off
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: [sdb] Mode Sense: 03 00 00 00
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Nov 17 17:46:42 fedora20.linux kernel: sdb: sdb1
Nov 17 17:46:42 fedora20.linux kernel: sd 6:0:0:0: [sdb] Attached SCSI removable disk
Nov 17 17:46:43 fedora20.linux udisksd[1489]: Mounted /dev/sdb1 at /run/media/litwin/NOWY on behalf of uid 1000

 

When we try to display partition table , we see something like that:

[root@forum litwin]# fdisk -l /dev/sdb

Disk /dev/sdb: 3.8 GiB, 4038066176 bytes, 7886848 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
Disklabel type: dos
Disk identifier: 0x000d8541

Device Boot Start End Blocks Id System
/dev/sdb1 128 7882879 3941376 b W95 FAT32

 

003. Write iso image into pendrive.

Be absolutely  sure, that you don’t do any mistake when you define output device. Check twice before you accept.

dd if=/media/130/litwin/\!INSTALL/Linux/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/sdb
1951744+0 records in
1951744+0 records out
999292928 bytes (999 MB) copied, 923.946 s, 1.1 MB/s

 

dd if=xxxx of=yyyy

where:

  • xxx is input device (iso fil
  • yyy is output device

 

“dd” command don’t produce any output during write process so be patient.

 

After writing, partition table can look like this one:

[root@forum litwin]# fdisk -l /dev/sdb

Disk /dev/sdb: 3.8 GiB, 4038066176 bytes, 7886848 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
Disklabel type: dos
Disk identifier: 0x5513338d

Device Boot Start End Blocks Id System
/dev/sdb1 * 0 1951743 975872 0 Empty
/dev/sdb2 172 10235 5032 ef EFI (FAT-12/16/32)
/dev/sdb3 10284 50603 20160 0 Empty

 

004. Reboot machine and try to run linux from pendrive…


 

 SECOND METHOD
– using Nautilus (file manager)

005. Preparation – Select image to use

Connect your pendrive and prepare iso Fedora linux image.

Select image to use

Select image to use

  • click right mouse button on iso image
  • select “Open with
  • select “Disk Image Writer

 

006. Select destination drive

Select destination drive

Select destination drive

Select destination drive – look at path (/dev/sdb) and compare disk size


 

 007. Additional info will be displayed

You can ignore information

You can ignore information

You can ignore this warning because in this way my pendrive have size of 4 GB and image ale smaller (has size of 1 GB) than destination.


 

008. Confirm write

Confirm restore

Confirm restore

Last question – “Are you sure you want to write the disk image to the device?”

Click on “Restore” to confirm.


 

009. Confirm action

Confirm operation with root password

Confirm operation with root password

Confirm action with root password.


 

010. Write linux image iso to destination device

Write image process

Write image process

After confirmation, write process will begin.

You see “Restoring Disk Image” with write progress.

Lower are displayed partition layout – OLD layout. When we start write process, original partition arrangement will be overwritten.


 

011. Image are written

Write process are finished.

Write process are finished.

When write process will be finished – new partitions arrangement will be displayed.

You can use now your new bootable pendrive with Fedora 20 linux on board!

 

 

 

 

.

Tags: , , , ,
Translate »