RobertCNelson / netinstall

Network Install for a bunch of arm boards
https://rcn-ee.com
80 stars 19 forks source link

/dev/sde1: No such file or directory #16

Closed rchapman1 closed 10 years ago

rchapman1 commented 11 years ago

I have been trying to install quantal for beaglebone black on an sd card using a centos 5.9 system. After installing a bunch of packages - I got rid of all those errors - but now get the above error for reasons I don't understand. Console session output below.

[root@C5 netinstall]# ./mk_mmc.sh --mmc /dev/sde --uboot bone-serial --distro quantal

I see... fdisk -l: Disk /dev/sda: 250.0 GB, 250058268160 bytes Disk /dev/sdb: 250.0 GB, 250058268160 bytes Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes Disk /dev/sdd: 2000.3 GB, 2000398934016 bytes Disk /dev/md1: 249.9 GB, 249949716480 bytes Disk /dev/md3: 1500.1 GB, 1500134703104 bytes Disk /dev/md2: 164 MB, 164364288 bytes Disk /dev/md0: 106 MB, 106823680 bytes Disk /dev/sde: 7958 MB, 7958691840 bytes

which: no lsblk in (/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin) mount: /dev/mapper/VolGroup00-LogVol01 on / type ext3 (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/md0 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw,nr_blocks=100000) /dev/mapper/VolGroup01-Data1 on /Share/Datavol type ext4 (rw,noatime)

Are you 100% sure, on selecting /dev/sde? y

Script Version git: 910b19f

Downloading Device's Bootloader

2013-05-13 17:20:16 URL:http://rcn-ee.net/deb/tools/latest/bootloader-ng [5582/5582] -> "/tmp/tmp.DvWzy23309/dl/bootloader-ng" [1] 2013-05-13 17:20:17 URL:http://rcn-ee.net/deb/tools/beaglebone/MLO-beaglebone-v2013.04-r7 [100928/100928] -> "/tmp/tmp.DvWzy23309/dl/MLO-beaglebone-v2013.04-r7" [1] SPL Bootloader: MLO-beaglebone-v2013.04-r7 --2013-05-13 17:20:18-- http://rcn-ee.net/deb/tools/beaglebone/u-boot-beaglebone-v2013.04-r7.img Resolving rcn-ee.net... 69.163.130.148 Connecting to rcn-ee.net|69.163.130.148|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 380280 (371K) [text/plain] Saving to: `/tmp/tmp.DvWzy23309/dl/u-boot-beaglebone-v2013.04-r7.img'

100%[=================================================================================================================================================================================================>] 380,280 157K/s in 2.4s

2013-05-13 17:20:20 (157 KB/s) - `/tmp/tmp.DvWzy23309/dl/u-boot-beaglebone-v2013.04-r7.img' saved [380280/380280]

UBOOT Bootloader: u-boot-beaglebone-v2013.04-r7.img

Downloading Device's Kernel Image

2013-05-13 17:20:21 URL:http://rcn-ee.net/deb/quantal-armhf/LATEST-omap-psp [239/239] -> "/tmp/tmp.DvWzy23309/dl/LATEST-omap-psp" [1] 2013-05-13 17:20:22 URL:http://rcn-ee.net/deb/quantal-armhf/v3.2.42-psp27/ [1400/1400] -> "/tmp/tmp.DvWzy23309/dl/index.html" [1] --2013-05-13 17:20:22-- http://rcn-ee.net/deb/quantal-armhf/v3.2.42-psp27/linux-image-3.2.42-psp27_1.0quantal_armhf.deb Resolving rcn-ee.net... 69.163.130.148 Connecting to rcn-ee.net|69.163.130.148|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 14702274 (14M) [application/x-debian-package] Saving to: `/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/quantal-armhf/linux-image-3.2.42-psp27_1.0quantal_armhf.deb'

100%[=================================================================================================================================================================================================>] 14,702,274 221K/s in 67s

2013-05-13 17:21:29 (215 KB/s) - `/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/quantal-armhf/linux-image-3.2.42-psp27_1.0quantal_armhf.deb' saved [14702274/14702274]

--2013-05-13 17:21:29-- http://rcn-ee.net/deb/quantal-armhf/v3.2.42-psp27/3.2.42-psp27-firmware.tar.gz Resolving rcn-ee.net... 69.163.130.148 Connecting to rcn-ee.net|69.163.130.148|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1272127 (1.2M) [application/x-tar] Saving to: `/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/quantal-armhf/3.2.42-psp27-firmware.tar.gz'

100%[=================================================================================================================================================================================================>] 1,272,127 220K/s in 6.3s

2013-05-13 17:21:36 (197 KB/s) - `/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/quantal-armhf/3.2.42-psp27-firmware.tar.gz' saved [1272127/1272127]

Using Kernel: linux-image-3.2.42-psp27_1.0quantal_armhf.deb

Downloading NetInstall Image

--2013-05-13 17:21:36-- http://ports.ubuntu.com/ubuntu-ports/dists/quantal/main/installer-armhf/20101020ubuntu186/images/omap/netboot/uInitrd Resolving ports.ubuntu.com... 91.189.92.175 Connecting to ports.ubuntu.com|91.189.92.175|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 12572206 (12M) [text/plain] Saving to: `/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/quantal-armhf/uInitrd'

100%[=================================================================================================================================================================================================>] 12,572,206 187K/s in 1m 54s

2013-05-13 17:23:32 (107 KB/s) - `/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/quantal-armhf/uInitrd' saved [12572206/12572206]

Note: NetInstall has u-boot header, removing...

196439+1 records in 196439+1 records out

12572142 bytes (13 MB) copied, 0.884822 seconds, 14.2 MB/s

md5sum of NetInstall: b1824b8f7be00d34ea97763525dd2cc5

Clone/Pulling am33x-cm3.git

Cloning into 'am33x-cm3'... remote: Counting objects: 351, done. remote: Compressing objects: 100% (350/350), done. remote: Total 351 (delta 208), reused 0 (delta 0) Receiving objects: 100% (351/351), 884.81 KiB | 30 KiB/s, done.

Resolving deltas: 100% (208/208), done.

Adding pre-built Firmware for am335x powermanagment

SRC: http://arago-project.org/git/projects/?p=am33x-cm3.git;a=summary

/Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/dl/am33x-cm3/bin/am335x-pm-firmware.bin' ->/tmp/tmp.DvWzy23309/firmware/am335x-pm-firmware.bin' cp: cannot stat `/tmp/tmp.DvWzy23309/cape-firmware/*.dtbo': No such file or directory NetInstall: Setting up to use Serial Port: [ttyO0]

NetInstall: Creating Custom Image

NetInstall: Extracting Base initrd.gz 51994 blocks NetInstall: Removing Optional Stuff to Save RAM Space NetInstall: Adding Distro Tweaks and Preseed Configuration /Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/lib/ubuntu-finish.sh' ->/tmp/tmp.DvWzy23309/initrd-tree/usr/bin/finish-install.sh' /Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/lib/flash_kernel/flash-kernel.conf' ->/tmp/tmp.DvWzy23309/initrd-tree/etc/flash-kernel.conf' /Share/Datavol/Backups/Open/ubuntu-13.04-console-armhf-2013-04-26/netinstall/lib/quantal-preseed.cfg' ->/tmp/tmp.DvWzy23309/initrd-tree/preseed.cfg' NetInstall: Extracting Kernel Boot Image NetInstall: Packaging Modules for later use NetInstall: Adding Device Tweaks NetInstall: Compressing initrd image 79666 blocks

Unmounting Partitions

Zeroing out Partition Table 1024+0 records in 1024+0 records out 1048576 bytes (1.0 MB) copied, 2.68254 seconds, 391 kB/s

Using fdisk to create an omap compatible fatfs BOOT partition

Command (m for help): Command action e extended p primary partition (1-4) Partition number (1-4): First cylinder (1-1023, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1023, default 1023): Command (m for help): Selected partition 1 Hex code (type L to list codes): Changed system type of partition 1 to e (W95 FAT16 (LBA))

Command (m for help): Disk /dev/sde: 7958 MB, 7958691840 bytes 245 heads, 62 sectors/track, 1023 cylinders Units = cylinders of 15190 * 512 = 7777280 bytes

Device Boot Start End Blocks Id System /dev/sde1 1 14 106299 e W95 FAT16 (LBA)

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks.

Setting Boot Partition's Boot Flag

Formating Boot Partition

mkfs.vfat 2.11 (12 Mar 2005) /dev/sde1: No such file or directory Failure: formating partition [root@C5 netinstall]#

RobertCNelson commented 11 years ago

This is a bug with older kernel's we never fully figured out... 'partprobe' is suppost to fix the 'issue' but it doesn't always..

Here is the sequence:

fdisk - create partition layout (/dev/sde1) parted - set boot flag (/dev/sde1) partprobe /dev/sde - (partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.) mkfs.vfat - halts as /dev/sde1 doesn't exist...

So any idea's?

We've had better luck with anything really past 2.6.32.. (with the partprobe fix)... 2.6.37+ just seem to work without the need for partprobe...

Regards,

rchapman1 commented 11 years ago

Thanks for the quick response Roberts... I spent most f a day trying to debug this problem with my Kernel - but he problem seems solid. Interestingly - I can easily make the fat32 file system after the script dies - using (I think) the same command that crashes in the script. I had a few theories - like maybe the auto-mount was trying to do something with /dev/sde1 as soon as the partition was created - but shutting down auofs didn't seem to help. Also gnome and probably KDE seem to try to mount USB drives whenever a file system appears - but doing it outside gnome/kde didn't help either.

I think I will have to give up - and somehow get a newer Kernel going on something.

Maybe if I had ubuntu running on the beagle bone - I could use that.... chickens and eggs...:-)

Richard.

On 13/05/2013 8:03 PM, Robert Nelson wrote:

This is a bug with older kernel's we never fully figured out... 'partprobe' is suppost to fix the 'issue' but it doesn't always..

Here is the sequence:

fdisk - create partition layout (/dev/sde1) parted - set boot flag (/dev/sde1) partprobe /dev/sde - (partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.) mkfs.vfat - halts as /dev/sde1 doesn't exist...

So any idea's?

We've had better luck with anything really past 2.6.32.. (with the partprobe fix)... 2.6.37+ just seem to work without the need for partprobe...

Regards,

— Reply to this email directly or view it on GitHub https://github.com/RobertCNelson/netinstall/issues/16#issuecomment-17807373.

Richard Chapman

RobertCNelson commented 11 years ago

Richard, you can use the step by step directions here: http://eewiki.net/display/linuxonarm/BeagleBone

rchapman1 commented 11 years ago

Thanks for your help Robert...

I think I have it going - but there is something pretty weird going on - and I thought I would pass my observations on to you in case it means something to you.... I had a look at the manual install method you pointed me to - but decided to try to get one of the script methods going first. I reverted to the "Metrhod 1" from here"http://elinux.org/BeagleBoardUbuntu#Method_1:_Download_a_Complete_Pre-Configured_Image "Download a complete image". This gave me similar problems to those I encountered with the netinstall method... in particular:

Both methods gave an error "Special device /dev/dse1 does not exist" when trying to format or mount the mmc drive. However - /dev/sde1 did seem to exist perfectly normally when accessed outside the script.

So I effectively split the script into two parts. The first part I stopped immediately before the two mkfs commands by commenting out:

format_boot_partition

format_rootfs_partition

and

populate_boot

populate_rootfs

This script then completed normally. I then did the two mkfs commands outside the script.

I then built a part 2 script by commenting out and adding some lines like this:

setup_bootscripts mount_partition_format="vfat" partprobe /dev/sde

unmount_all_drive_partitions

create_partitions

populate_boot populate_rootfs

The second line I added because mount_partition_format was defined in one of commented out function. The partprobe I added while trying things - and it probably isn't required.

When I first ran the part 2 script - it still complained that /dev/sde1 didn't exist. I was suspicious that auto-mount might be interfering - so I explicitly mounted both /dev/sde1 and /dev/sde2 to a different mount point outside the script - and then reran the script. I was trying to establish whether this would give the same error.

TO MY AMAZEMENT - the script ran fine. It appears that while the script ran - sde1 and sde2 were mounted in two places each. Both mount points appear to have the correct file-system and tree on them. I didn't think that was possible...???

Anyhow - there is something weird about eh interaction between my Centos 5.9 kernel (Linux 2.6.18-348.4.1.el5 on x86_6) and that script./

Hope this is helpful in some way..

Thanks for your help. It is really appreciated.

Richard.

On 14/05/2013 8:08 PM, Robert Nelson wrote:

Richard, you can use the step by step directions here: http://eewiki.net/display/linuxonarm/BeagleBone

— Reply to this email directly or view it on GitHub https://github.com/RobertCNelson/netinstall/issues/16#issuecomment-17871861.

Richard Chapman

rchapman1 commented 11 years ago

Hi again Roberts

Hope you don't mind me asking another question...

My ubuntu on BBB boots ok - but I note that the root file-system seems to be mounted read only. I get errors whenever I try to write anything.

I note fstab includes:

/etc/fstab: static file system information.

#

Auto generated by RootStock-NG: setup_sdcard.sh

# /dev/mmcblk0p2 / ext3 noatime,errors=remount-ro 0 1

/dev/mmcblk0p1 /boot/uboot auto defaults 0 0

with the option: errors=remount-ro

Maybe it got an error trying to mount he root filesystem at boot time? Any thoughts on what might be going on here?

Thanks Robert

Richard.

On 14/05/2013 8:08 PM, Robert Nelson wrote:

Richard, you can use the step by step directions here: http://eewiki.net/display/linuxonarm/BeagleBone

— Reply to this email directly or view it on GitHub https://github.com/RobertCNelson/netinstall/issues/16#issuecomment-17871861.

Richard Chapman

rchapman1 commented 11 years ago

Hi Robert

Thought I should let you know - I've got it going... The root file system had fsck errors for some reason - and when I fixed them - the system came up read/write as it should. FYI: I installed webmin on it - and that also works fine - and gives a graphical system management interface that does most of what you need...:-)

Richard.

On 14/05/2013 8:08 PM, Robert Nelson wrote:

Richard, you can use the step by step directions here: http://eewiki.net/display/linuxonarm/BeagleBone

— Reply to this email directly or view it on GitHub https://github.com/RobertCNelson/netinstall/issues/16#issuecomment-17871861.

Richard Chapman