[opensuse-arm] "installing" openSuSE on raspberry pi2 using nfsroot
Hello group, as I am really unlucky with sd cards, every one has bad sectors, data are partly not fully written without notice... ... I want to try to install openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2 image using a nfsroot. anyone who tried this? my idea was first to install to an sdcard (hope this will work) then try to build a initrd with network/nfs support (or does the original already have?) modify boot params to use nfsroot (and of course put the rootfs on an nfs share). even better would be a pxe-bootloader.. googling around i did not find such for arm/raspberry pi.. any hints? Thank you for any input and ideas nice weekend Paul -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 28/01/2017 10:55, Paul Neuwirth wrote:
Hello group, as I am really unlucky with sd cards, every one has bad sectors, data are partly not fully written without notice... ... I want to try to install openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2 image using a nfsroot. anyone who tried this?
I haven't but it should be reasonably straight forward.
my idea was first to install to an sdcard (hope this will work) then try to build a initrd with network/nfs support (or does the original already have?) modify boot params to use nfsroot (and of course put the rootfs on an nfs share).
Basically that should work. To generate a working initrd, just do it within the nfsroot chroot: $ mount <nfs> /nfs $ for i in dev dev/pts sys proc; do mount --bind /$i /nfs/$i; done $ chroot /nfs $ mkinitrd That way dracut has the chance to detect that your rootfs (/, which is really /nfs) is located on NFS and include network as well as NFS support. The resulting initrd obviously resides on your NFS share then though ;).
even better would be a pxe-bootloader.. googling around i did not find such for arm/raspberry pi.. any hints?
There is full PXE support on the Raspberry Pi 3: https://www.raspberrypi.org/blog/pi-3-booting-part-ii-ethernet-all-the-aweso... But even with a normal SD based boot, U-Boot already has everything it needs to make PXE boot work. Try: U-Boot# setenv boot_targets dhcp U-Boot# boot that should try to load grub2 from dhcp rather than SD card. If you want to make this permanent, just remove your bootarm.efi binary on the ESP (/dev/mmcblk0p1). Once you're in grub2, you can access file paths relative to the PXE loading location IIRC. Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Saturday 2017-01-28 11:46, Alexander Graf wrote:
On 28/01/2017 10:55, Paul Neuwirth wrote:
Hello group, as I am really unlucky with sd cards, every one has bad sectors, data are partly not fully written without notice... ... I want to try to install openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2 image using a nfsroot. anyone who tried this?
I haven't but it should be reasonably straight forward.
my idea was first to install to an sdcard (hope this will work) then try to build a initrd with network/nfs support (or does the original already have?) modify boot params to use nfsroot (and of course put the rootfs on an nfs share).
Basically that should work. To generate a working initrd, just do it within the nfsroot chroot:
$ mount <nfs> /nfs $ for i in dev dev/pts sys proc; do mount --bind /$i /nfs/$i; done $ chroot /nfs $ mkinitrd
That way dracut has the chance to detect that your rootfs (/, which is really /nfs) is located on NFS and include network as well as NFS support.
The resulting initrd obviously resides on your NFS share then though ;).
even better would be a pxe-bootloader.. googling around i did not find such for arm/raspberry pi.. any hints?
There is full PXE support on the Raspberry Pi 3:
https://www.raspberrypi.org/blog/pi-3-booting-part-ii-ethernet-all-the-aweso...
But even with a normal SD based boot, U-Boot already has everything it needs to make PXE boot work. Try:
U-Boot# setenv boot_targets dhcp U-Boot# boot
that should try to load grub2 from dhcp rather than SD card. If you want to make this permanent, just remove your bootarm.efi binary on the ESP (/dev/mmcblk0p1).
Once you're in grub2, you can access file paths relative to the PXE loading location IIRC.
Alex
thanks, exactly the information i need. but i am still failing at the first step... copied image on sd card, installation (creating partitions, etc.) seemed to work, after a reboot system did not come up.. (uboot, grub2 worked, loading initrd -> nothing) now i wanted to check the ext-filesystem: # fsck.ext4 -c -f /dev/sdd2 e2fsck 1.42.11 (09-Jul-2014) The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt! good start :-/ ok several badblocks, but fsck succeeded not finding any fs errors.. boot... again nothing :( going to try next sd card -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 28.01.17 14:07 Paul Neuwirth wrote:
now i wanted to check the ext-filesystem:
# fsck.ext4 -c -f /dev/sdd2 e2fsck 1.42.11 (09-Jul-2014) The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt!
good start :-/
Seems like the resizing of the filesystem (so the whole sd is used), that is done on the first (or second?) boot, did not run through. Johannes
On Saturday 2017-01-28 14:34, Johannes Kastl wrote:
Date: Sat, 28 Jan 2017 14:34:15 From: Johannes Kastl
To: opensuse-arm@opensuse.org Subject: Re: [opensuse-arm] "installing" openSuSE on raspberry pi2 using nfsroot On 28.01.17 14:07 Paul Neuwirth wrote:
now i wanted to check the ext-filesystem:
# fsck.ext4 -c -f /dev/sdd2 e2fsck 1.42.11 (09-Jul-2014) The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt!
good start :-/
Seems like the resizing of the filesystem (so the whole sd is used), that is done on the first (or second?) boot, did not run through.
Johannes
ok.. maybe i was too impatient at the second boot.. but normally a message is produced when removing sd card during this step. that was an 8GB sd card, havin bad blocks somewhere in the middle. the next 32GB card i tried... image got copied.. but partprobe did not find anything after write.. just zeros at the beginnung.. next card is again 32GB.. image got written, ext4fs is ok no bad blocks. wondering how long the resizing for this will need. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 28/01/17 14:45, Paul Neuwirth wrote:
On Saturday 2017-01-28 14:34, Johannes Kastl wrote:
Date: Sat, 28 Jan 2017 14:34:15 From: Johannes Kastl
To: opensuse-arm@opensuse.org Subject: Re: [opensuse-arm] "installing" openSuSE on raspberry pi2 using nfsroot On 28.01.17 14:07 Paul Neuwirth wrote:
now i wanted to check the ext-filesystem:
# fsck.ext4 -c -f /dev/sdd2 e2fsck 1.42.11 (09-Jul-2014) The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt!
good start :-/
Seems like the resizing of the filesystem (so the whole sd is used), that is done on the first (or second?) boot, did not run through.
Johannes
ok.. maybe i was too impatient at the second boot.. but normally a message is produced when removing sd card during this step. that was an 8GB sd card, havin bad blocks somewhere in the middle. the next 32GB card i tried... image got copied.. but partprobe did not find anything after write.. just zeros at the beginnung.. next card is again 32GB.. image got written, ext4fs is ok no bad blocks. wondering how long the resizing for this will need.
I usually wait about 10 minutes for an sd-card of 8GB size, just to be sure. This is sufficient, the pi3 then boots from the installed system on the sd-card afterwards. -- On a long enough timeline the survival rate for everyone drops to zero... -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Saturday 2017-01-28 14:45, Paul Neuwirth wrote:
The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt!
good start :-/
Seems like the resizing of the filesystem (so the whole sd is used), that is done on the first (or second?) boot, did not run through.
Johannes
ok.. maybe i was too impatient at the second boot.. but normally a message is produced when removing sd card during this step. that was an 8GB sd card, havin bad blocks somewhere in the middle. the next 32GB card i tried... image got copied.. but partprobe did not find anything after write.. just zeros at the beginnung.. next card is again 32GB.. image got written, ext4fs is ok no bad blocks. wondering how long the resizing for this will need.
at boot complain: mmc0: card stuck in programming mode ... error.. timeout.. aborting.. reboot. after reboot same errors.. seems I don't have not even one working card... if I put it into my usb cardreader: [1971190.289615] usb-storage 1-5:1.0: USB Mass Storage device detected [1971190.291394] usb-storage 1-5:1.0: Quirks match for vid 05e3 pid 0723: 8000 [1971190.291431] scsi host7: usb-storage 1-5:1.0 [1971191.290763] scsi 7:0:0:0: Direct-Access Generic STORAGE DEVICE 9451 PQ: 0 ANSI: 0 [1971191.291877] sd 7:0:0:0: Attached scsi generic sg7 type 0 [1971191.367701] sd 7:0:0:0: [sdd] Attached SCSI removable disk # partprobe -s /dev/sdd Error: Error opening /dev/sdd: No medium found double check with another cardreader 1971366.847557] sd 7:0:0:2: [sdf] 61831168 512-byte logical blocks: (31.7 GB/29.5 GiB) [1971366.855309] sd 7:0:0:2: [sdf] Write Protect is off [1971366.855314] sd 7:0:0:2: [sdf] Mode Sense: 03 00 00 00 [1971366.860300] sd 7:0:0:2: [sdf] No Caching mode page found [1971366.860304] sd 7:0:0:2: [sdf] Assuming drive cache: write through [1971366.864298] sd 7:0:0:0: [sdd] Attached SCSI removable disk [1971366.872813] sd 7:0:0:3: [sdg] Attached SCSI removable disk [1971366.884683] sdf: sdf1 sdf2 ok.. fsck.ext4 -cf /dev/sdf2 e2fsck 1.42.11 (09-Jul-2014) Checking for bad blocks (read-only test): done ROOT: Updating bad block inode. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information ROOT: ***** FILE SYSTEM WAS MODIFIED ***** ROOT: 82565/186944 files (0.6% non-contiguous), 650011/746480 blocks seems also ok.. trying again -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Saturday 2017-01-28 16:06, Paul Neuwirth wrote:
On Saturday 2017-01-28 14:45, Paul Neuwirth wrote:
The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt!
good start :-/
Seems like the resizing of the filesystem (so the whole sd is used), that is done on the first (or second?) boot, did not run through.
Johannes
no luck at all with 32GB cards (one definitely bad.. the other at 2nd boot with errors) but I was lucky with trying the 8GB card tried again, first boot ok, 2nd boot.. nothing also after waiting more than half an hour. back in my usb cardreader: [1975418.300887] scsi 7:0:0:3: Direct-Access Generic STORAGE DEVICE 9602 PQ: 0 ANSI: 0 [1975418.300980] sd 7:0:0:2: [sdf] 1024 512-byte logical blocks: (524 kB/512 KiB) [1975418.302672] sd 7:0:0:3: Attached scsi generic sg10 type 0 [1975418.305784] sd 7:0:0:2: [sdf] Write Protect is off [1975418.305792] sd 7:0:0:2: [sdf] Mode Sense: 03 00 00 00 [1975418.308753] sd 7:0:0:2: [sdf] No Caching mode page found [1975418.308757] sd 7:0:0:2: [sdf] Assuming drive cache: write through [1975418.320886] sd 7:0:0:3: [sdg] Attached SCSI removable disk [1975418.391649] sd 7:0:0:2: [sdf] Attached SCSI removable disk [1975427.644100] usb 1-5: reset high-speed USB device number 29 using ehci-pci [1975428.832775] sd 7:0:0:2: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [1975428.832783] sd 7:0:0:2: [sdf] tag#0 Sense Key : Unit Attention [current] [1975428.832788] sd 7:0:0:2: [sdf] tag#0 Add. Sense: Not ready to ready change, medium may have changed [1975428.832792] sd 7:0:0:2: [sdf] tag#0 CDB: Read(10) 28 00 00 00 03 f9 00 00 01 00 [1975428.832803] blk_update_request: I/O error, dev sdf, sector 1017 [1975442.600056] usb 1-5: reset high-speed USB device number 29 using ehci-pci [1975442.962493] sd 7:0:0:2: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [1975442.962502] sd 7:0:0:2: [sdf] tag#0 Sense Key : Unit Attention [current] [1975442.962506] sd 7:0:0:2: [sdf] tag#0 Add. Sense: Not ready to ready change, medium may have changed [1975442.962511] sd 7:0:0:2: [sdf] tag#0 CDB: Read(10) 28 00 00 00 03 f8 00 00 01 00 [1975442.962518] blk_update_request: I/O error, dev sdf, sector 1016 [1975442.969747] sd 7:0:0:2: [sdf] 15562752 512-byte logical blocks: (7.97 GB/7.42 GiB) [1975442.995646] sdf: sdf1 sdf2 sdf3 # fsck.ext4 -cf /dev/sdf2 e2fsck 1.42.11 (09-Jul-2014) The filesystem size (according to the superblock) is 1767649 blocks The physical size of the device is 1765641 blocks Either the superblock or the partition table is likely to be corrupt! Abort<y>? no Checking for bad blocks (read-only test): badblocks: Invalid argument during seekrs) badblocks: Invalid argument during seek [...] ROOT: Updating bad block inode. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information ROOT: ***** FILE SYSTEM WAS MODIFIED ***** ROOT: 28546/427680 files (0.1% non-contiguous), 269372/1767649 blocks # resize2fs /dev/sdf2 resize2fs 1.42.11 (09-Jul-2014) Resizing the filesystem on /dev/sdf2 to 1765641 (4k) blocks. The filesystem on /dev/sdf2 is now 1765641 blocks long. # fsck.ext4 -f /dev/sdf2 e2fsck 1.42.11 (09-Jul-2014) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Block bitmap differences: -4625 -(12237--12238) Fix<y>? yes Free blocks count wrong for group #0 (20529, counted=20532). Fix<y>? yes Free blocks count wrong (1498277, counted=1498280). Fix<y>? yes ROOT: ***** FILE SYSTEM WAS MODIFIED ***** ROOT: 28546/427680 files (0.1% non-contiguous), 267361/1765641 blocks and I'll try again.. a working system :) now back to topic :) Paul -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (4)
-
Alexander Graf
-
Freigeist
-
Johannes Kastl
-
Paul Neuwirth