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

: PiHub now in stock.
 
Pages: [1]

Author Topic: Fixing mount point via JTAG!?  (Read 6097 times)

CageHunter

  • Newbie
  • *
  • Posts: 2
Fixing mount point via JTAG!?
« on: 15 December 2010, 08:17:01 am »

Hello everyone!

My target was to increase the Plug's space.
Therefore I copied the contents of /etc, /usr and /var to an USB-Drive, each on another partition
After that I removed the original folders from the plug and mounted the partitions at their position.
At last I modified the sftab to make my mountings persistent.

Before anyone begins to laugh : Yes, I'm a Linux noob -.-

My Problem is now, of course the plug cannot boot anymore, because it cannot find the fstab
(it's on the external drive -.-)
Now I was looking in the JTAG's options whether I could just copy the fstab to its old place from usb
or at least create a new one. The best solution would be setting the mounting points directly within
the "x_bootargs_root" or similar, but I didn't find anything about a similar problem in the net.

I can't even find a documentation to the JTAG's commands :(

Hopefully, there's someone who can help me.
Thanks a lot for reading my bad English :)
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Fixing mount point via JTAG!?
« Reply #1 on: 15 December 2010, 08:44:13 am »

The U-Boot environment variables can be used to specify the location of the rootfs. See http://www.newit.co.uk/forum/index.php/topic,400.0.html for the default settings.

Currently I don't believe anyone is booting a Guruplug entirely from an external device, although it is possible to boot from a kernel in NAND, with a rootfs on an external device.
Logged

CageHunter

  • Newbie
  • *
  • Posts: 2
Re: Fixing mount point via JTAG!?
« Reply #2 on: 15 December 2010, 08:51:27 am »

Thanks a lot for your reply :)

Yes, I guess that's the problem I have :
The root is still on the plug, but the /etc folder where the fstab is located is now only on my usb-drive.
But is it possible to determine within the U-Boot environment that the location of /etc is another than the kernels location?

My not-on-the-plug located fstab changes these folders location the following way :

/etc -> /dev/sda5
/var -> /dev/sda7
/usr -> /dev/sda10
/media -> /dev/sda12

these folders are only on my usb, the rest is still on the plug

Best regards
« Last Edit: 15 December 2010, 08:54:31 am by CageHunter »
Logged

sfzhi

  • Jr. Member
  • **
  • Posts: 54
Re: Fixing mount point via JTAG!?
« Reply #3 on: 15 December 2010, 12:57:36 pm »

It would be much simpler to just boot the kernel with init=/bin/bash parameters.
Then it won't matter where /etc is (assuming, of course, that you still have /bin in the internal flash).
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Fixing mount point via JTAG!?
« Reply #4 on: 15 December 2010, 06:11:17 pm »

Thanks a lot for your reply :)

Yes, I guess that's the problem I have :
The root is still on the plug, but the /etc folder where the fstab is located is now only on my usb-drive.
But is it possible to determine within the U-Boot environment that the location of /etc is another than the kernels location?

My not-on-the-plug located fstab changes these folders location the following way :

/etc -> /dev/sda5
/var -> /dev/sda7
/usr -> /dev/sda10
/media -> /dev/sda12

these folders are only on my usb, the rest is still on the plug

Best regards


You should probably change your environment variable (bootcmd) to include something like usb start; root=/dev/sda1 rootdelay=10
Logged

Confusticated

  • New IT customer
  • Hero Member
  • *
  • Posts: 663
Re: Fixing mount point via JTAG!?
« Reply #5 on: 15 December 2010, 10:01:53 pm »

Unfortunately 'init' is in '/sbin/' which wont be mounted if you follow Marcus's post.
(EDIT: If you can obtain a copy of 'init' and put it at the root of the 'usb-drive' then
the kernel should find it. BUT you will still be in a dangerous position with the
kernel modules and all the libraries 'off-root')

Your best option is to boot the plug following sfzhi's advice and restore the
file system to its original state.

Rather than booting off NAND, why not boot using an uSD card (which you can
replace when it eventually fails) or an external eSATA drive. You should only use
flash for a read/write filesystem if you fully understand the consequences of
wear'n'tear and how to reduce it to the minimum.
« Last Edit: 15 December 2010, 10:20:37 pm by Confusticated »
Logged
Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
Pages: [1]
 
 

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