New IT forum
13 August 2022, 12:11:50 pm *
Welcome, %1$s. Please login or register.

: CubieBoard 2 and Cubietruck both now in stock.
 
Pages: 1 [2] 3

Author Topic: "Bus error" from vim on Dreamplug  (Read 36159 times)

craigmcfly

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #15 on: 24 April 2011, 09:14:43 pm »

Hi,

Thanks for the info. I saw the same thing on fdisk, which makes me feel better in a strange way.

I tried to manually recreate the partitions and it's now stopped working, so I guess there's special info in the disk image. I'll wait until you have chance to upload the disk image.

Cheers,

Craig
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: "Bus error" from vim on Dreamplug
« Reply #16 on: 25 April 2011, 09:47:27 am »

Sorry for the delay.

I have a compressed rootfs for the Dreamplug or a compressed micro-SD card image

These files were prepared by taking a micro-SD card out of a virgin, never-booted Dreamplug. (I suppose that it was booted at some time during production, for test purposes, but not necessarily from the micro-SD card that was eventually supplied).

I would like to make a comparison of the contents against the official rootfs , but have not yet had time to do so.

I stick by my hypothesis that your card might have been good from the outset, but that perhaps there was a problem with reading it that was hardware-related (including, for instance, a seating or wiring / connection issue). See my earlier post; I experienced a similar difficulty to what you did (it manifest itself differently - I could read the directories within /, but when I tried to ls /etc I saw errors. After placing the card in a different host, it became readable). Of course since you have already tried to rewrite your SD card this issue is moot, except to remind you to check the connections of the wires that join the main board to the SD card board.

I think that the simplest option is the dd image. If you use it, you ensure that the card is formatted correctly (in both partitions). It's 316M, unfortunately, but I guess it could have been worse.
Logged

craigmcfly

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #17 on: 25 April 2011, 10:23:21 am »

Hmm, dd has just finished writing the disk image and:

Quote
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1016     1920993+   6  FAT16
Partition 1 has different physical/logical endings:
     phys=(54, 61, 61) logical=(1015, 54, 24)
/dev/sdb2              56        1021     1826706   83  Linux


I'll see if it boots up
Logged

craigmcfly

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #18 on: 25 April 2011, 10:51:54 am »

Okay, so it booted, which is nice, but attempting to write 512mb from /dev/zero still generated

Quote
Apr 25 10:38:48 ubuntu kernel: attempt to access beyond end of device
Apr 25 10:38:48 ubuntu kernel: sda2: rw=1, want=3634040, limit=3634038
Apr 25 10:38:48 ubuntu kernel: lost page write due to I/O error on sda2
Apr 25 10:38:48 ubuntu kernel: attempt to access beyond end of device
Apr 25 10:38:48 ubuntu kernel: sda2: rw=1, want=3634048, limit=3634038
Apr 25 10:38:48 ubuntu kernel: lost page write due to I/O error on sda2
Apr 25 10:38:48 ubuntu kernel: attempt to access beyond end of device
Apr 25 10:38:48 ubuntu kernel: sda2: rw=1, want=3634056, limit=3634038
Apr 25 10:38:48 ubuntu kernel: lost page write due to I/O error on sda2
Apr 25 10:38:48 ubuntu kernel: attempt to access beyond end of device
Apr 25 10:38:48 ubuntu kernel: sda2: rw=1, want=3634064, limit=3634038

If I try to set the same image up on a 4G micro SD, then the partitions now look like:

Quote
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1016     1920993+   6  FAT16
/dev/sdb2              56        1021     1826706   83  Linux

======================
libparted : 2.3
======================
Cannot have overlapping partitions.


Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: "Bus error" from vim on Dreamplug
« Reply #19 on: 25 April 2011, 11:16:01 am »

What command are you using to get your "cannot have overlapping partitions" output? (and how are you reading the card i.e. an SD card slot in a desktop host?)

All I can see is the output from the fdisk command that I posted earlier.

Have you tried manually partitioning and placing the appropriate files to each partition?

I'll see if I can prepare a larger SD card with the contents that I previously uploaded, and test if that works.

Logged

craigmcfly

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #20 on: 25 April 2011, 11:19:07 am »

The overlapping partitions error was generated by parted (or gparted, to be specific) in the desktop host I used to dd the image to the disk.

Okay, so I wiped the 2g disk and manually created the partitions and restored with the two partition files you provided. I did

Quote
[email protected]:~# dd if=/dev/zero of=test.file bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 99.7167 s, 5.4 MB/s

and it wrote a lot faster and with no errors in /var/log/messages.

I'm not in a position to try installing any packages at the mo, however I'll try that en masse tonight with vim, mysql, asterisk and htop, which are my standard packages :)

One thing of interest:

Quote
[email protected]:~# fdisk -l

Disk /dev/sda: 1967 MB, 1967128576 bytes
61 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3782 * 512 = 1936384 bytes
Disk identifier: 0x000196e1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          55      102400    6  FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 32, 33) logical=(0, 33, 3)
Partition 1 has different physical/logical endings:
     phys=(12, 223, 19) logical=(54, 42, 16)
Partition 1 does not end on cylinder boundary.
/dev/sda2              55        1016     1817600   83  Linux
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(12, 223, 20) logical=(54, 42, 17)
Partition 2 has different physical/logical endings:
     phys=(239, 39, 56) logical=(1015, 53, 32)
Partition 2 does not end on cylinder boundary.

but it doesn't seem to be causing any problems so far. Any thoughts?
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: "Bus error" from vim on Dreamplug
« Reply #21 on: 25 April 2011, 11:59:19 am »

One thing of interest:

Quote
[email protected]:~# fdisk -l

Disk /dev/sda: 1967 MB, 1967128576 bytes
61 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3782 * 512 = 1936384 bytes
Disk identifier: 0x000196e1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          55      102400    6  FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 32, 33) logical=(0, 33, 3)
Partition 1 has different physical/logical endings:
     phys=(12, 223, 19) logical=(54, 42, 16)
Partition 1 does not end on cylinder boundary.
/dev/sda2              55        1016     1817600   83  Linux
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(12, 223, 20) logical=(54, 42, 17)
Partition 2 has different physical/logical endings:
     phys=(239, 39, 56) logical=(1015, 53, 32)
Partition 2 does not end on cylinder boundary.

but it doesn't seem to be causing any problems so far. Any thoughts?

Well, I noticed it and gave a little sigh. No concrete thoughts about it though. I'm keeping my fingers crossed.
Logged

craigmcfly

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #22 on: 25 April 2011, 10:35:43 pm »

Okay, it is a LOT happier now! I had some problems with mysql not creating a root user, but I think that's something in the ubuntu packages more than anything else. I'm going to keep an eye on it and see if any other logs throw up. Thanks for your help. Going to start a new thread with problem 2 :)
Logged

donkies4u

  • Newbie
  • *
  • Posts: 2
Re: "Bus error" from vim on Dreamplug
« Reply #23 on: 01 May 2011, 01:32:42 am »

I had the same problem with my brand new dreamplug (< 1 day old).

Note I installed debian on /dev/sda2.

When ever you wrote sometime to sda2 you would receive

"attempt to access beyond end of device" and fdisk would complain with the error described above.

Reading from disk was okay though.

Note I didn't touch the original partitioning of the SD card in any way.


I ended up buying an 8G SD card. Created the two required partitions

sda1  FAT16 100 Megs and copying the uImage across from the original SD Card.
sda2  ext3 file system on the rest of the SD. Then installing debian on it.

Then opening the dreamplug and swapping out the original  SD card.

So far it appears to be working without issue.
Logged

rfrazier

  • New IT customer
  • Jr. Member
  • *
  • Posts: 60
    • RLF
Re: "Bus error" from vim on Dreamplug
« Reply #24 on: 03 May 2011, 12:42:48 pm »

Clone (instead of copying) wars.

I too had problems as a result (supposedly) of the filesystem on the internal microSD being cloned.  I started putting down the Debian filesystem right before I went to bed.  I found the errors when I got up.  (It was a frustrating evening.  I had local problems with my workstation too. Don't rely on grub if it is on the second disk.)  

With the DreamPlug, I decided to start over and do it properly.  Although I have a jtag, I took the microSD card out, repartitioned it and put the appropriate filesystems on it.  I then added uImage to the first fat partition.  Then I put the Debian filesystem on the second partition.  It was much, much faster using my workstation to do this.  Although it is in part because of the faster disk reading, the main reason is that there isn't nearly as much load on the system, and there is a lot more memory for caching.  

After I put the microSD back in the DreamPlug, it booted Debian just fine.  I'm now doing a dist-upgrade from lenny to stable.  That seems to be going well, although the fat (ext3, actually) lady hasn't yet sung.  

Other than that, it seems a really nifty item, and just what I wanted.  (I'll get rid of the blinking lights, bluetooth and wifi.)

Best wishes,
Bob

PS Although I'm now just using the 2GB microSD, I also got a 8GB Class 10 SLC SD with my DreamPlug.  My thought was to partition it and have 1GB swap, 3.5GB /var/www, 2GB /home and the rest /var/log/.  This way the areas that get written to most will be on the faster, external, SD.  Also, if needs be, the system will boot without the external SD in place.
RLF

PPS The fat lady has sung, and sweetly too.  After the dist-upgrade to stable, I had no problem booting.  It all looks good.
RLF

PPPS Once I got over the initial problem with the internal microSD, it was pretty straightforward.

Code: [Select]
sheevaplug-debian:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              1787000    672760   1023464  40% /
tmpfs                   256888         0    256888   0% /lib/init/rw
udev                     10240       180     10060   2% /dev
tmpfs                   256888         4    256884   1% /dev/shm
/dev/sdb2              3612272    491772   2936960  15% /var/www
/dev/sdb4              1217516     34840   1120828   4% /var/log
/dev/sda1               104226      2650    101576   3% /media/usb0
/dev/sdb3              2063536     35972   1922740   2% /home/rfrazier
tmpfs                   256888         0    256888   0% /var/cache/apt
sheevaplug-debian:~# cat /etc/debian_version
6.0.1
sheevaplug-debian:~#
RLF
« Last Edit: 03 May 2011, 01:56:26 pm by rfrazier »
Logged

jgm

  • Newbie
  • *
  • Posts: 3
Re: "Bus error" from vim on Dreamplug
« Reply #25 on: 06 May 2011, 06:37:12 pm »

A quick +1 for problems with the internal microSD's partitions.

After attempting to fix it in situ I ended up pulling the microSD card out and plugging it in to a linux box.  I then deleted the existing partition table and did the following:
   - partition 1 FAT16 25MB
   - partition 2 ext3 rest of space

I put uImage on partition 1 and the debian rootfs on partition 2 (BTW it goes a lot quicker when you do it on a PC and not the dreamplug) and things are looking a lot better now.
Logged

toyg

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #26 on: 07 May 2011, 12:38:34 am »

Another +1, started having errors about sda2 after a few hours of usage.

If I have to reformat the microsd, I was thinking I might as well go the full mile and use a 16Gb card. Can you see anything wrong with that ?

Edit: AND how did you guys manage to open the enclosure to get to the card, without breaking anything ?
« Last Edit: 07 May 2011, 12:59:42 am by toyg »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: "Bus error" from vim on Dreamplug
« Reply #27 on: 07 May 2011, 08:59:10 am »

Edit: AND how did you guys manage to open the enclosure to get to the card, without breaking anything ?

http://www.newit.co.uk/forum/index.php/topic,1991.msg5532.html#msg5532
Logged

toyg

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #28 on: 07 May 2011, 02:48:50 pm »

Yeah, I had problems opening the external case. Turns out you have to slide out the 4 plastic feet, there are screws underneath.
Also one has to be careful: while opening the case, I've accidentally de-soldiered one of the small metallic plaques from the power cable.

After that, extracting the microSD is a piece of cake.
Logged

toyg

  • Newbie
  • *
  • Posts: 11
Re: "Bus error" from vim on Dreamplug
« Reply #29 on: 07 May 2011, 09:36:39 pm »

Replaced the microsd with a new 16Gb class 4 (not ideal, but will do for now), filesystem previously mounted on a separate pc and recreated from the release files as per instructions... and now it works perfectly. I'm almost tempted to try again with the wifi client mode.

It's a shame that such a lovely concept kit should be let down badly by issues purely related to software and quality-control. In that regard, it reminds me of the Nokia N900.
Logged
Pages: 1 [2] 3
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!