summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-10-16 18:02:32 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-10-16 18:02:32 +0000
commit1d35994e040d8000f6b851bad43073f1b27a6d9b (patch)
treecc14d3692be5b7fc7230d3b30d9fc5bba09f6488
parent93e552dd13d359b393c6a955603892a2b121e385 (diff)
downloaddrakx-1d35994e040d8000f6b851bad43073f1b27a6d9b.tar
drakx-1d35994e040d8000f6b851bad43073f1b27a6d9b.tar.gz
drakx-1d35994e040d8000f6b851bad43073f1b27a6d9b.tar.bz2
drakx-1d35994e040d8000f6b851bad43073f1b27a6d9b.tar.xz
drakx-1d35994e040d8000f6b851bad43073f1b27a6d9b.zip
mandrake-move is cloop stuff
-rw-r--r--mdk-stage1/cdrom.c6
-rw-r--r--mdk-stage1/config-stage1.h3
-rw-r--r--mdk-stage1/mount.c3
3 files changed, 10 insertions, 2 deletions
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c
index 8fc4868d4..8c136c125 100644
--- a/mdk-stage1/cdrom.c
+++ b/mdk-stage1/cdrom.c
@@ -48,7 +48,7 @@ static int mount_that_cd_device(char * dev_name)
static int test_that_cd()
{
#ifdef MANDRAKE_MOVE
- return access(IMAGE_LOCATION "/usr/bin/runstage2", R_OK);
+ return access(IMAGE_LOCATION "/live_tree.clp", R_OK);
#else
return access(IMAGE_LOCATION LIVE_LOCATION, R_OK);
#endif
@@ -73,6 +73,10 @@ static enum return_type do_with_device(char * dev_name, char * dev_model)
#ifndef MANDRAKE_MOVE
if (IS_SPECIAL_STAGE2 || ramdisk_possible())
load_ramdisk(); /* we don't care about return code, we'll do it live if we failed */
+#else
+ my_insmod("cloop", ANY_DRIVER_TYPE, "file=" IMAGE_LOCATION "/live_tree.clp");
+ if (my_mount("/dev/cloop0", IMAGE_LOCATION_REAL, "iso9660", 0))
+ stg1_error_message("Could not mount compressed loopback :(.");
#endif
if (IS_RESCUE)
diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h
index 9e28be52e..ab30b58ae 100644
--- a/mdk-stage1/config-stage1.h
+++ b/mdk-stage1/config-stage1.h
@@ -33,7 +33,8 @@
#ifdef MANDRAKE_MOVE
#define DISTRIB_NAME "Mandrake Move"
-#define IMAGE_LOCATION "/sysroot/image"
+#define IMAGE_LOCATION "/sysroot/image_raw"
+#define IMAGE_LOCATION_REAL "/sysroot/image"
#define SLASH_LOCATION "/sysroot"
#define LIVE_LOCATION_REL "/image"
#else
diff --git a/mdk-stage1/mount.c b/mdk-stage1/mount.c
index 2511fde99..8e0ef31e5 100644
--- a/mdk-stage1/mount.c
+++ b/mdk-stage1/mount.c
@@ -127,6 +127,9 @@ int ensure_dev_exists(char *dev)
minor = 8 * charstar_to_int(ptr+1);
ptr = strchr(ptr, 'p');
minor += charstar_to_int(ptr+1);
+ } else if (ptr_begins_static_str(name, "cloop")) {
+ major = 240;
+ minor = name[5] - '0';
} else {
log_message("I don't know how to create device %s, please post bugreport to me!", dev);
return -1;