Page 1 of 1

mm_url_dist_get

Posted: Thu Apr 03, 2008 7:31 am
by jangi
I think there may be a bug in this function, but it could just be my setup.

Should the line:

Code: Select all

...
&& mm_url_get "${MM_MINIMYTH_BOOT_URL}${REMOTE_FILE_0}" "${LOCAL_FILE}" \
...

be:

Code: Select all

...
&& mm_url_get "${MM_TFTP_BOOT_URL}${REMOTE_FILE_0}" "${LOCAL_FILE}" \
...
?

The bug only manifests itself if you use a MM_MINIMYTH_BOOT_URL option on the boot line. I can provide more details... but it's late.

Posted: Fri Apr 11, 2008 2:27 pm
by Pablo
I believe it is correct.

/etc/rc.d/init.d/conf replaces MM_MINIMYTH_BOOT_URL with MM_TFTP_BOOT_URL when MM_MINIMYTH_BOOT_URL is not already set (e.g. set on the command line or in minimyth.conf) MM_TFTP_BOOT_URL.

The assumption is that all files available on your TFTP server (including the distribution files) are available at MM_MINIMYTH_BOOT_URL. Otherwise, large distribution files such as the themes would need to be downloaded using the TFTP protocol rather than the protocol of MM_MINIMYTH_BOOT_URL.

Posted: Fri Apr 11, 2008 6:13 pm
by jangi
Maye. Guess I should've posted more details the first time. Here's my TFTP dir structure:

Code: Select all

./:
drwxr-xr-x 6 root data    4096 2008-04-05 19:57 mm
-rw-r--r-- 1 root root   12952 2008-04-02 02:58 pxelinux.0
drwxr-xr-x 2 root root    4096 2008-04-02 21:49 pxelinux.cfg

./mm:
drwxr-xr-x 4 root root 4096 2008-04-02 03:23 conf
drwxrwxr-x 3 1000 1000 4096 2008-04-05 19:56 ram

./mm/conf:
drwxr-xr-x 2 root root 4096 2008-04-10 22:15 myth1
drwxr-xr-x 2 root root 4096 2008-04-02 03:20 myth2

./mm/conf/myth1:
-rwxr-xr-x 1 root root 34524 2008-04-10 22:13 libdvdcss.so.2
-rw-r--r-- 1 root data  2350 2007-12-25 00:51 lircd.conf
-rw-rw-rw- 1 root data  8697 2008-01-07 21:01 lircrc
-rw-r--r-- 1 root data  6491 2008-04-10 22:15 minimyth.conf
-rwxr-xr-x 1 root root    86 2008-04-10 22:14 minimyth.script
lrwxrwxrwx 1 root root    17 2008-04-03 19:20 themes -> ../../ram/themes/

./mm/ram:
-rw-rw-r-- 1 1000 1000  1431576 2008-04-05 13:07 kernel
-rw-r--r-- 1 1000 1000 61837312 2008-04-05 13:08 rootfs
drwxrwxr-x 2 1000 1000     4096 2008-04-05 13:08 themes

./mm/ram/themes:
-rw-r--r-- 1 1000 1000 5758976 2008-04-05 13:08 blootubelite-wide.sfs
-rw-r--r-- 1 1000 1000  393216 2008-04-05 13:08 blootube-osd.sfs
-rw-r--r-- 1 1000 1000  172032 2008-04-05 13:08 blueosd.sfs
-rw-r--r-- 1 1000 1000 1351680 2008-04-05 13:08 blue.sfs
-rw-r--r-- 1 1000 1000  106496 2008-04-05 13:08 defaultosd.sfs
-rw-r--r-- 1 1000 1000 3264512 2008-04-05 13:08 G.A.N.T.sfs
-rw-r--r-- 1 1000 1000  311296 2008-04-05 13:08 Gray-OSD.sfs
-rw-r--r-- 1 1000 1000  348160 2008-04-05 13:08 isthmus.sfs
-rw-r--r-- 1 1000 1000  327680 2008-04-05 13:08 Iulius-OSD.sfs
-rw-r--r-- 1 1000 1000  409600 2008-04-05 13:08 Iulius.sfs
-rw-r--r-- 1 1000 1000 1859584 2008-04-05 13:08 Minimalist-wide.sfs
-rw-r--r-- 1 1000 1000  868352 2008-04-05 13:08 MythCenter.sfs
-rw-r--r-- 1 1000 1000 1921024 2008-04-05 13:08 MythCenter-wide.sfs
-rw-r--r-- 1 1000 1000  438272 2008-04-05 13:08 Retro-OSD.sfs
-rw-r--r-- 1 1000 1000 2056192 2008-04-05 13:08 Retro.sfs
-rw-r--r-- 1 1000 1000  135168 2008-04-05 13:08 Titivillus-OSD.sfs
-rw-r--r-- 1 1000 1000 5619712 2008-04-05 13:08 Titivillus.sfs


./pxelinux.cfg:
-rw-r--r-- 1 root root 183 2008-04-02 21:49 01-00-40-63-c3-9b-84
So pxelinux.0 is in /, with it's cfg dir. That is the boot url by default so booting fails until I pass a MM_MINIMYTH_BOOT_URL on the boot line pointing to /mm/. Then it finds the rootfs, downloads and extracts. mm_confro_get successfully pulls the conf from /mm/conf/myth1 because it appends conf/myth1 (or conf/default) to the boot url.

The problem is during theme loading. mm_url_dist_get prepends MM_ROOTFS_IMAGE (minus the rootfs filename on the end) to the theme file. Then it appends that to MM_MINIMYTH_BOOT_URL. With my config you get the following:

MM_TFTP_BOOT_URL=tftp://192.168.3.2/
MM_MINIMYTH_BOOT_URL=tftp://192.168.3.2/mm/
MM_ROOTFS_IMAGE=mm/ram/rootfs

So it's trying to pull a theme from tftp://192.168.3.2/mm/mm/ram/themes.

Posted: Sat Apr 12, 2008 4:03 pm
by Pablo
jangi wrote:MM_TFTP_BOOT_URL=tftp://192.168.3.2/
MM_MINIMYTH_BOOT_URL=tftp://192.168.3.2/mm/
MM_ROOTFS_IMAGE=mm/ram/rootfs
Assuming that you are not setting MM_MINIMYTH_BOOT_URL, I see how MM_TFTP_BOOT_URL and MM_MINIMYTH_BOOT_URL can be different.

From which files are you reading these values?

Are you setting MM_MINIMYTH_BOOT_URL either on your boot line or in your minimyth.conf?

Posted: Sun Apr 13, 2008 12:03 pm
by jangi
I am setting MM_MINIMYTH_BOOT_URL on the boot line. I am getting the values mm finds from the files in /etc/conf.d after boot.

Posted: Sun Apr 13, 2008 10:44 pm
by Pablo
Could you post your boot line and your minimyth.conf file?

Posted: Sun Apr 13, 2008 11:22 pm
by jangi
Sure. I'm using pxelinux with the following config:

Code: Select all

DEFAULT minimyth-via

LABEL minimyth-via
        KERNEL mm/ram/kernel
        APPEND ro root=/dev/ram0 ramdisk_size=96000 initrd=mm/ram/rootfs MM_MINIMYTH_BOOT_URL="tftp://192.168.3.2/mm/"
minimyth.conf:

Code: Select all

MM_VIDEO_ASPECT_RATIO='4:3'
MM_X_ENABLED='yes'
MM_X_OUTPUT_VGA='none'
MM_X_MODE='720x480Under'
MM_X_OUTPUT_TV='auto'
MM_X_TV_OUTPUT='S-Video'
MM_X_WM_ENABLED='yes'
MM_MASTER_SERVER='192.168.3.2'
MM_MASTER_DBUSERNAME='mythtv'
MM_MASTER_DBPASSWORD='mythtv'
MM_MASTER_DBNAME='mythconverg'
MM_THEME_NAME='MythCenter-wide'
MM_THEMEOSD_NAME='isthmus'
MM_MEDIA_MUSIC_URL="nfs://${MM_TFTP_SERVER}/data/music"
MM_MEDIA_GAME_URL="nfs://${MM_TFTP_SERVER}/data/gameroms"
MM_MEDIA_VIDEO_URL="nfs://${MM_TFTP_SERVER}/data/video"
MM_LIRC_DRIVER='atiusb'
MM_LIRC_DEVICE='/dev/lirc0'
MM_LIRC_FETCH_LIRCD_CONF='yes'
MM_LIRC_FETCH_LIRCRC='yes'
MM_MYTHDB_SETTINGS_GuiWidth='GuiWidth~682'
MM_MYTHDB_SETTINGS_GuiHeight='GuiHeight~440'
MM_MYTHDB_SETTINGS_GuiOffsetX='GuiOffsetX~3'
MM_MYTHDB_SETTINGS_GuiOffsetY='GuiOffsetY~22'
MM_MINIMYTH_FETCH_MINIMYTH_SCRIPT='yes'
minimyth.script:

Code: Select all

#/bin/sh

. /etc/rc.d/functions
mm_confro_get libdvdcss.so.2 /usr/lib/libdvdcss.so.2

Posted: Mon Apr 14, 2008 12:55 am
by Pablo
I see the problem. I should have see it before from your directory structure.

As I mentioned, the files available on your TFTP server must be available at MM_MINIMYTH_BOOT_URL. However, in your case they are not because you have test MM_MINIMYTH_BOOT_URL={MM_TFTP_BOOT_URL}/mm. As a result, you have shifted the directory structure.

The pxelinux.0 file and the conf directory need to be in the same directory. From the location of configuration files:
In practice, this means that if you network boot MiniMyth then you put the MiniMyth configuration directories in the same directory on the TFTP server as the network boot loader (called 'pxelinux.0' when using PXELinux), and that if you local boot MiniMyth, then you put the MiniMyth configuration directories at the root of the partition labeled 'minimyth', which MiniMyth will automatically mount at the mount point '/minimyth'.